pub enum DrawCommand {
MoveTo {
x: f32,
y: f32,
},
MoveToNoDraw {
x: f32,
y: f32,
},
LineTo {
x: f32,
y: f32,
},
BezierTo {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
},
Spline {
points: Vec<(f32, f32)>,
},
ExtendSpline {
points: Vec<(f32, f32)>,
},
ClosePath,
}Expand description
Drawing command types
Variants§
MoveTo
Move to position (m command)
MoveToNoDraw
Move without drawing (n command)
LineTo
Line to position (l command)
BezierTo
Cubic Bezier curve (b command)
Spline
B-spline (s command - converted to bezier internally)
ExtendSpline
Extended B-spline (p command)
ClosePath
Close path (c command)
Trait Implementations§
Source§impl Clone for DrawCommand
impl Clone for DrawCommand
Source§fn clone(&self) -> DrawCommand
fn clone(&self) -> DrawCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DrawCommand
impl RefUnwindSafe for DrawCommand
impl Send for DrawCommand
impl Sync for DrawCommand
impl Unpin for DrawCommand
impl UnsafeUnpin for DrawCommand
impl UnwindSafe for DrawCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more