FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ShapeVisual

    struct · ferroui-base · v0.5.0

    struct ShapeVisual
    

    A visual that draws shapes (WinUI Microsoft.UI.Composition.ShapeVisual): its shapes in order, through its view_box when it has one, then its children.

    The shapes are clipped to the size of the visual (so a shape visual without a size shows no shapes, as in WinUI); the visual itself does not clip its children (clip_to_bounds is false, as for a sprite visual). A change of a shape, of its geometry or brushes, of the collections or of the view box, an animation included, redraws the visual.

    View source

    Members

    from_visual

    fn from_visual(visual: &Rc<CompositionVisual>) -> Option<ShapeVisual>
    

    The handle of visual as a shape visual, if it is one.

    Source

    visual

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

    The visual as a composition visual.

    Source

    shapes

    fn shapes(self: &Self) -> Rc<CompositionShapeCollection>
    

    The shapes the visual draws, in order.

    Source

    view_box

    fn view_box(self: &Self) -> Option<Rc<CompositionViewBox>>
    

    The area of the shape coordinates the visual shows.

    Source

    set_view_box

    fn set_view_box(self: &Self, value: Option<Rc<CompositionViewBox>>)
    

    Source

    Trait implementations

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

    Availability

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