pub enum PathCommand {
MoveTo(Point),
LineTo(Point),
QuadTo {
control: Point,
to: Point,
},
CubicTo {
first: Point,
second: Point,
to: Point,
},
Arc {
center: Point,
radius: f32,
start: f32,
sweep: f32,
},
Close,
}Expand description
One step of a Path, in logical pixels from the canvas’s top-left.
Variants§
MoveTo(Point)
Starts a new piece at the point.
LineTo(Point)
A straight line to the point.
QuadTo
A quadratic curve to to, bent toward control.
CubicTo
A cubic curve to to, leaving toward first and arriving from
second.
Fields
Arc
An arc of a circle, from start degrees through sweep degrees,
clockwise from 3 o’clock, with a line to its start from where the
path is.
Fields
Close
A straight line back to where the piece started, closing it.
Trait Implementations§
Source§impl Clone for PathCommand
impl Clone for PathCommand
impl Copy for PathCommand
Source§impl Debug for PathCommand
impl Debug for PathCommand
Source§impl PartialEq for PathCommand
impl PartialEq for PathCommand
impl StructuralPartialEq for PathCommand
Auto Trait Implementations§
impl Forget for PathCommand
impl Freeze for PathCommand
impl Move for PathCommand
impl RefUnwindSafe for PathCommand
impl Send for PathCommand
impl Sync for PathCommand
impl Unpin for PathCommand
impl UnsafeUnpin for PathCommand
impl UnwindSafe for PathCommand
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