pub struct Path { /* private fields */ }
Expand description
A sequence of commands that defines a set of contours, each of which consists of a sequence of curve segments. Each contour is either open or closed.
Implementations§
Source§impl Path
impl Path
Sourcepub fn commands(&self) -> Commands<'_> ⓘ
pub fn commands(&self) -> Commands<'_> ⓘ
Returns an iterator over the commands that make up self
.
Sourcepub fn points_mut(&mut self) -> &mut [Point]
pub fn points_mut(&mut self) -> &mut [Point]
Returns a mutable slice of the points that make up self
.
Sourcepub fn line_to(&mut self, p: Point)
pub fn line_to(&mut self, p: Point)
Adds a line segment to the current contour, starting at the current point.
pub fn quadratic_to(&mut self, p1: Point, p: Point)
pub fn cubic_to(&mut self, p1: Point, p2: Point, p: Point)
Trait Implementations§
Source§impl ExtendFromInternalIterator<PathCommand> for Path
impl ExtendFromInternalIterator<PathCommand> for Path
Source§fn extend_from_internal_iter<I>(&mut self, internal_iter: I)where
I: IntoInternalIterator<Item = PathCommand>,
fn extend_from_internal_iter<I>(&mut self, internal_iter: I)where
I: IntoInternalIterator<Item = PathCommand>,
Extends
self
with each item of internal_iter
.Source§impl FromInternalIterator<PathCommand> for Path
impl FromInternalIterator<PathCommand> for Path
Source§fn from_internal_iter<I>(internal_iter: I) -> Selfwhere
I: IntoInternalIterator<Item = PathCommand>,
fn from_internal_iter<I>(internal_iter: I) -> Selfwhere
I: IntoInternalIterator<Item = PathCommand>,
Creates
Self
from an internal iterator. Read moreSource§impl Transform for Path
impl Transform for Path
fn transform<T>(self, t: &T) -> Pathwhere
T: Transformation,
fn transform_mut<T>(&mut self, t: &T)where
T: Transformation,
impl StructuralPartialEq for Path
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