pub struct ShapeVisual(/* private fields */);Expand description
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.
Implementations§
Source§impl ShapeVisual
impl ShapeVisual
Sourcepub fn from_visual(visual: &Rc<CompositionVisual>) -> Option<ShapeVisual>
pub fn from_visual(visual: &Rc<CompositionVisual>) -> Option<ShapeVisual>
The handle of visual as a shape visual, if it is one.
Sourcepub fn visual(&self) -> &Rc<CompositionVisual>
pub fn visual(&self) -> &Rc<CompositionVisual>
The visual as a composition visual.
Sourcepub fn shapes(&self) -> Rc<CompositionShapeCollection>
pub fn shapes(&self) -> Rc<CompositionShapeCollection>
The shapes the visual draws, in order.
Sourcepub fn view_box(&self) -> Option<Rc<CompositionViewBox>>
pub fn view_box(&self) -> Option<Rc<CompositionViewBox>>
The area of the shape coordinates the visual shows.
pub fn set_view_box(&self, value: Option<Rc<CompositionViewBox>>)
Trait Implementations§
Source§impl Clone for ShapeVisual
impl Clone for ShapeVisual
Source§impl Deref for ShapeVisual
impl Deref for ShapeVisual
Source§type Target = Rc<CompositionVisual>
type Target = Rc<CompositionVisual>
The resulting type after dereferencing.
Source§fn deref(&self) -> &Rc<CompositionVisual>
fn deref(&self) -> &Rc<CompositionVisual>
Dereferences the value.
Auto Trait Implementations§
impl !RefUnwindSafe for ShapeVisual
impl !Send for ShapeVisual
impl !Sync for ShapeVisual
impl !UnwindSafe for ShapeVisual
impl Freeze for ShapeVisual
impl Unpin for ShapeVisual
impl UnsafeUnpin for ShapeVisual
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more