FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RedirectVisual

    struct · ferroui-base · v0.5.0

    struct RedirectVisual
    

    A visual that shows the subtree of another visual in its own place (WinUI Microsoft.UI.Composition.RedirectVisual): the source keeps rendering where it is, and the redirect visual draws the content and the children of the source again, in its own coordinates, under its own children.

    The source is drawn as a CompositionVisualSurface draws it: its content and children with their transforms, clips and opacities, the visibility, opacity, transform and clip of the source itself ignored. A redirect visual follows the changes of the source subtree while the source is attached to a composition target. A redirect visual inside the subtree of its own source draws nothing (it would contain itself).

    Like a sprite visual, a redirect visual does not clip to its bounds when it is created (clip_to_bounds is false).

    View source

    Members

    from_visual

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

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

    Source

    visual

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

    The visual as a composition visual.

    Source

    source

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

    The visual whose subtree the redirect visual shows.

    Source

    set_source

    fn set_source(self: &Self, value: Option<Rc<CompositionVisual>>)
    

    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.