pub struct CompositionPath { /* private fields */ }Expand description
The path of a CompositionPathGeometry (WinUI
Microsoft.UI.Composition.CompositionPath): an immutable platform
geometry, made from a FerroUI Geometry (a StreamGeometry, a
PathGeometry, …) or from a string of path data.
Deviation (winui-composition.md): WinUI makes a path from an
IGeometrySource2D (a Win2D geometry); here the source is a FerroUI
geometry, and the path keeps the platform geometry it had when the path
was made.
Implementations§
Source§impl CompositionPath
impl CompositionPath
Sourcepub fn new(geometry: Arc<dyn IGeometryImpl>) -> CompositionPath
pub fn new(geometry: Arc<dyn IGeometryImpl>) -> CompositionPath
A path over a platform geometry.
Sourcepub fn from_geometry(geometry: &Geometry) -> Option<CompositionPath>
pub fn from_geometry(geometry: &Geometry) -> Option<CompositionPath>
The path of geometry, as it is now; None when the geometry has no
platform geometry.
Sourcepub fn parse(data: &str) -> Result<CompositionPath, FormatError>
pub fn parse(data: &str) -> Result<CompositionPath, FormatError>
The path described by a string of path data (the mini-language of
Geometry::parse).
Sourcepub fn geometry(&self) -> &Arc<dyn IGeometryImpl> ⓘ
pub fn geometry(&self) -> &Arc<dyn IGeometryImpl> ⓘ
The platform geometry of the path.
Trait Implementations§
Source§impl Clone for CompositionPath
impl Clone for CompositionPath
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionPath
impl !UnwindSafe for CompositionPath
impl Freeze for CompositionPath
impl Send for CompositionPath
impl Sync for CompositionPath
impl Unpin for CompositionPath
impl UnsafeUnpin for CompositionPath
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