BoxShadow
struct · ferroui-base · v0.5.0
struct BoxShadow
Represents a box shadow which can be attached to an element or control.
Members
offset_x
offset_x: f64
The horizontal offset (distance) of the shadow.
offset_y
offset_y: f64
The vertical offset (distance) of the shadow.
blur
blur: f64
The blur radius. A higher value results in a more blurred shadow.
spread
spread: f64
The spread radius. Positive values make the shadow grow, negative values make it shrink.
color
color: crate::media::Color
The color of the shadow.
is_inset
is_inset: bool
Whether the shadow is an inner shadow (inset) rather than an outer shadow (outset).
parse
fn parse(s: &str) -> Result<BoxShadow, FormatError>
Parses a BoxShadow string: [inset] offset-x offset-y [blur [spread]] color,
or none.
transform_bounds
fn transform_bounds(self: &Self, rect: Rect) -> Rect
Transforms the specified bounding rectangle to account for the shadow's offset, spread, and blur.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneCopyDebugDefaultStructuralPartialEqPartialEqFromStrDisplayBatchValueMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.