pub struct Shadow {
pub radius: Dp,
pub spread: Dp,
pub offset: DpOffset,
pub color: Color,
pub brush: Option<Brush>,
pub alpha: f32,
pub blend_mode: BlendMode,
pub cutout: bool,
}Expand description
Static shadow configuration.
This mirrors Compose’s static Shadow object where radius/spread/offset
are provided in density-independent units and converted to pixels at draw time.
Fields§
§radius: Dp§spread: Dp§offset: DpOffset§color: Color§brush: Option<Brush>§alpha: f32§blend_mode: BlendMode§cutout: boolKnocks the unoffset, unspread shape out of the shadow silhouette before blurring, leaving shadow only OUTSIDE the element. Required for translucent surfaces (glass): a backdrop-sampling material must not refract its own shadow.
Implementations§
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more