pub struct BoxShadow {
pub blur_radius: PxPct,
pub color: Color,
pub spread: PxPct,
pub left_offset: PxPct,
pub right_offset: PxPct,
pub top_offset: PxPct,
pub bottom_offset: PxPct,
}Expand description
Structure holding data about the shadow.
Fields§
§blur_radius: PxPct§color: Color§spread: PxPct§left_offset: PxPct§right_offset: PxPct§top_offset: PxPct§bottom_offset: PxPctImplementations§
Source§impl BoxShadow
impl BoxShadow
Sourcepub fn blur_radius(self, radius: impl Into<PxPct>) -> Self
pub fn blur_radius(self, radius: impl Into<PxPct>) -> Self
Specifies shadow blur. The larger this value, the bigger the blur, so the shadow becomes bigger and lighter.
Sourcepub fn spread(self, spread: impl Into<PxPct>) -> Self
pub fn spread(self, spread: impl Into<PxPct>) -> Self
Specifies shadow blur spread. Positive values will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink.
Sourcepub fn left_offset(self, left_offset: impl Into<PxPct>) -> Self
pub fn left_offset(self, left_offset: impl Into<PxPct>) -> Self
Specifies the offset of the left edge.
Sourcepub fn right_offset(self, right_offset: impl Into<PxPct>) -> Self
pub fn right_offset(self, right_offset: impl Into<PxPct>) -> Self
Specifies the offset of the right edge.
Sourcepub fn top_offset(self, top_offset: impl Into<PxPct>) -> Self
pub fn top_offset(self, top_offset: impl Into<PxPct>) -> Self
Specifies the offset of the top edge.
Sourcepub fn bottom_offset(self, bottom_offset: impl Into<PxPct>) -> Self
pub fn bottom_offset(self, bottom_offset: impl Into<PxPct>) -> Self
Specifies the offset of the bottom edge.
Trait Implementations§
Source§impl StylePropValue for BoxShadow
impl StylePropValue for BoxShadow
fn debug_view(&self) -> Option<Box<dyn View>>
fn interpolate(&self, other: &Self, value: f64) -> Option<Self>
fn combine(&self, _other: &Self) -> CombineResult<Self>
Source§fn content_hash(&self) -> u64
fn content_hash(&self) -> u64
Compute a content-based hash for this value. Read more
impl Copy for BoxShadow
impl StructuralPartialEq for BoxShadow
Auto Trait Implementations§
impl Freeze for BoxShadow
impl RefUnwindSafe for BoxShadow
impl Send for BoxShadow
impl Sync for BoxShadow
impl Unpin for BoxShadow
impl UnwindSafe for BoxShadow
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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