pub struct Path { /* private fields */ }Expand description
A 2D geometric path.
Implementations§
Source§impl Path
impl Path
Sourcepub fn set_fill_type(&mut self, fill_type: FillType)
pub fn set_fill_type(&mut self, fill_type: FillType)
Set the fill type.
Sourcepub fn verb_count(&self) -> usize
pub fn verb_count(&self) -> usize
Get the number of verbs.
Sourcepub fn point_count(&self) -> usize
pub fn point_count(&self) -> usize
Get the number of points.
Sourcepub fn last_point(&self) -> Option<Point>
pub fn last_point(&self) -> Option<Point>
Get the last point in the path.
Sourcepub fn contour_count(&self) -> usize
pub fn contour_count(&self) -> usize
Get the number of contours in the path.
Sourcepub fn convexity(&self) -> PathConvexity
pub fn convexity(&self) -> PathConvexity
Get the convexity of the path.
Sourcepub fn direction(&self) -> Option<PathDirection>
pub fn direction(&self) -> Option<PathDirection>
Get the direction of the first contour.
Sourcepub fn transformed(&self, matrix: &Matrix) -> Self
pub fn transformed(&self, matrix: &Matrix) -> Self
Create a transformed copy of the path.
Sourcepub fn contains(&self, point: Point) -> bool
pub fn contains(&self, point: Point) -> bool
Check if a point is inside the path (using fill rule).
Sourcepub fn tight_bounds(&self) -> Rect
pub fn tight_bounds(&self) -> Rect
Compute tight bounds (considering curve control points).
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 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