FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ThemeShadowVisual

    struct · ferroui-base · v0.5.0

    struct ThemeShadowVisual
    

    The shadow visual of a caster: created by the caster's Visual, shown by its parent before the caster's own visual.

    View source

    Members

    new

    fn new(caster: &Rc<CompositionVisual>, recipe: &DropShadowRecipe) -> ThemeShadowVisual
    

    Creates the shadow visual of caster (the composition visual of the caster): its transform is taken in the space of the caster (ParentForTransform), its opacity follows the caster's through an expression (as UpdateDropShadowVisualOpacity does for an animated opacity), and it is not hit-testable.

    The handler starts with the shape of recipe, so that the first frame that shows the visual draws the shadow (a message reaches the handler a frame later).

    Source

    visual

    fn visual(self: &Self) -> &Rc<CompositionVisual>
    

    The composition visual.

    Source

    update

    fn update(self: &Self, recipe: &DropShadowRecipe, size: Vector, visible: bool)
    

    Shows recipe around a caster of size, or nothing when visible is false or the recipe draws nothing.

    Source

    box_shadows

    fn box_shadows(self: &Self) -> Vec<BoxShadow>
    

    The box shadows the visual draws (for tests).

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the visual.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

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