FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BoxShadow

    struct · ferroui-base · v0.5.0

    struct BoxShadow
    

    Represents a box shadow which can be attached to an element or control.

    View source

    Members

    offset_x

    offset_x: f64
    

    The horizontal offset (distance) of the shadow.

    Source

    offset_y

    offset_y: f64
    

    The vertical offset (distance) of the shadow.

    Source

    blur

    blur: f64
    

    The blur radius. A higher value results in a more blurred shadow.

    Source

    spread

    spread: f64
    

    The spread radius. Positive values make the shadow grow, negative values make it shrink.

    Source

    color

    color: crate::media::Color
    

    The color of the shadow.

    Source

    is_inset

    is_inset: bool
    

    Whether the shadow is an inner shadow (inset) rather than an outer shadow (outset).

    Source

    parse

    fn parse(s: &str) -> Result<BoxShadow, FormatError>
    

    Parses a BoxShadow string: [inset] offset-x offset-y [blur [spread]] color, or none.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • Default
    • StructuralPartialEq
    • PartialEq
    • FromStr
    • Display
    • BatchValue
    • MarkupTyped
    • ValueTypeRegistration

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.