SpriteVisual
struct · ferroui-base · v0.5.0
struct SpriteVisual
A visual that paints its size with a composition brush and casts a
shadow (WinUI Microsoft.UI.Composition.SpriteVisual): the shadow of its
rectangle, then the brush over (0, 0, size), then its children.
The brush is any CompositionBrush: the colour and gradient brushes
fill the rectangle, a
CompositionSurfaceBrush lays out its
surface in it. A change of the brush or of the shadow, an animation
included, redraws the visual.
Unlike the other visuals of the compositor, a sprite visual does not
clip to its bounds when it is created (clip_to_bounds is false), as
a WinUI visual: its shadow and its children may extend beyond its size.
Members
from_visual
fn from_visual(visual: &Rc<CompositionVisual>) -> Option<SpriteVisual>
The handle of visual as a sprite visual, if it is one.
visual
fn visual(self: &Self) -> &Rc<CompositionVisual>
The visual as a composition visual.
brush
fn brush(self: &Self) -> Option<Rc<CompositionBrush>>
The brush the visual paints its size with.
set_brush
fn set_brush(self: &Self, value: Option<Rc<CompositionBrush>>)
shadow
fn shadow(self: &Self) -> Option<Rc<DropShadow>>
The shadow of the visual.
set_shadow
fn set_shadow(self: &Self, value: Option<Rc<DropShadow>>)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDeref
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.