pub struct Path { /* private fields */ }Expand description
Path is an immutable collection of line and Bézier contours.
Build paths with PathBuilder. Display lists retain shared Arc handles,
so recording and nesting do not copy path data.
Implementations§
Source§impl Path
impl Path
Sourcepub fn tight_bounds(&self) -> Rect
pub fn tight_bounds(&self) -> Rect
tight_bounds returns exact axis-aligned curve bounds.
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
heap_bytes returns an estimate of owned path storage.
Sourcepub fn contains(&self, point: Point, fill_rule: FillRule) -> bool
pub fn contains(&self, point: Point, fill_rule: FillRule) -> bool
contains reports whether a point lies inside the filled path.
The query evaluates the original curves, implicitly closes open contours, and treats points on the outline as inside.
Sourcepub fn measure(&self, tolerance: f32) -> Vec<ContourMeasure>
pub fn measure(&self, tolerance: f32) -> Vec<ContourMeasure>
measure returns an arc-length measurement for each nonempty contour.
tolerance is the maximum flattening deviation in path coordinates.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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