pub enum PathCommand {
MoveTo([f32; 2]),
LineTo([f32; 2]),
QuadTo {
control: [f32; 2],
end: [f32; 2],
},
CubicTo {
control1: [f32; 2],
control2: [f32; 2],
end: [f32; 2],
},
Close,
}Expand description
A path segment command — SVG-style.
Variants§
MoveTo([f32; 2])
Move to a point (starts a new subpath).
LineTo([f32; 2])
Straight line to a point.
QuadTo
Quadratic Bezier curve (one control point + endpoint).
CubicTo
Cubic Bezier curve (two control points + endpoint).
Fields
Close
Close the path (line back to the last MoveTo point).
Trait Implementations§
Source§impl Clone for PathCommand
impl Clone for PathCommand
Source§fn clone(&self) -> PathCommand
fn clone(&self) -> PathCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze 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