pub struct Shadow {
pub color: Color,
pub blur: f64,
pub dx: f64,
pub dy: f64,
pub spread: f64,
}Expand description
Sombra proyectada detrás del rect del nodo (drop shadow), rasterizada
con el draw_blurred_rounded_rect nativo de vello. Se pinta antes
del relleno, así el fill (si es opaco) tapa la parte solapada y la
sombra sólo asoma por el desenfoque + el offset. El radio sigue al del
nodo (más spread).
Fields§
§color: Color§blur: f64Desviación estándar del gaussiano (qué tan difusa). En px.
dx: f64Desplazamiento de la sombra respecto del nodo.
dy: f64§spread: f64Cuánto crece (px) el rect de la sombra respecto del nodo.
Implementations§
Source§impl Shadow
impl Shadow
Sourcepub fn new(color: Color, blur: f64) -> Self
pub fn new(color: Color, blur: f64) -> Self
Sombra con color + blur explícitos, sin offset ni spread.
Sourcepub fn soft(alpha: u8, blur: f64) -> Self
pub fn soft(alpha: u8, blur: f64) -> Self
Elevación suave y tasteful: negro translúcido, leve caída hacia abajo. El default razonable para cards/menús/modales.
pub fn offset(self, dx: f64, dy: f64) -> Self
pub fn spread(self, spread: f64) -> Self
Trait Implementations§
impl Copy for Shadow
impl StructuralPartialEq for Shadow
Auto Trait Implementations§
impl Freeze for Shadow
impl RefUnwindSafe for Shadow
impl Send for Shadow
impl Sync for Shadow
impl Unpin for Shadow
impl UnsafeUnpin for Shadow
impl UnwindSafe for Shadow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more