pub struct Path {
pub commands: Vec<PathCommand>,
}Expand description
A geometric path expressed as a sequence of drawing commands.
All coordinates are in the local user space of the enclosing group.
Fields§
§commands: Vec<PathCommand>Drawing commands, executed in order.
Implementations§
Source§impl Path
impl Path
Sourcepub fn move_to(&mut self, p: Point) -> &mut Self
pub fn move_to(&mut self, p: Point) -> &mut Self
Append a PathCommand::MoveTo — start a new subpath at p.
Sourcepub fn line_to(&mut self, p: Point) -> &mut Self
pub fn line_to(&mut self, p: Point) -> &mut Self
Append a PathCommand::LineTo — straight line to p.
Sourcepub fn quad_to(&mut self, control: Point, end: Point) -> &mut Self
pub fn quad_to(&mut self, control: Point, end: Point) -> &mut Self
Append a PathCommand::QuadCurveTo — quadratic Bezier to end
with control point control.
Sourcepub fn cubic_to(&mut self, c1: Point, c2: Point, end: Point) -> &mut Self
pub fn cubic_to(&mut self, c1: Point, c2: Point, end: Point) -> &mut Self
Append a PathCommand::CubicCurveTo — cubic Bezier to end
with control points c1 and c2.
Sourcepub fn close(&mut self) -> &mut Self
pub fn close(&mut self) -> &mut Self
Append a PathCommand::Close — close the current subpath.
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