pub struct Path { /* private fields */ }
Expand description
A Bezier path.
Can be created via PathBuilder
.
Where PathBuilder
can be created from the Path
using clear
to reuse the allocation.
Guarantees
- Has a valid, precomputed bounds.
- All points are finite.
- Has at least two segments.
- Each contour starts with a MoveTo.
- No duplicated Move.
- No duplicated Close.
- Zero-length contours are allowed.
Implementations
Returns the bounds of the path’s points.
The value is already calculated.
Returns a transformed in-place path.
Some points may become NaN/inf therefore this method can fail.
pub fn segments(&self) -> PathSegmentsIter<'_>ⓘNotable traits for PathSegmentsIter<'a>impl<'a> Iterator for PathSegmentsIter<'a> type Item = PathSegment;
pub fn segments(&self) -> PathSegmentsIter<'_>ⓘNotable traits for PathSegmentsIter<'a>impl<'a> Iterator for PathSegmentsIter<'a> type Item = PathSegment;
Notable traits for PathSegmentsIter<'a>
impl<'a> Iterator for PathSegmentsIter<'a> type Item = PathSegment;
Returns an iterator over path’s segments.
Clears the path and returns a PathBuilder
that will reuse an allocated memory.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Path
impl UnwindSafe for Path
Blanket Implementations
Mutably borrows from an owned value. Read more