pub enum PathCommand {
MoveTo(Point<f32>),
LineTo(Point<f32>),
QuadTo(Point<f32>, Point<f32>),
CubicTo(Point<f32>, Point<f32>, Point<f32>),
Close,
}Expand description
One command of a resolved outline path, in device space.
Variants§
MoveTo(Point<f32>)
Starts a new subpath at the given point.
LineTo(Point<f32>)
Draws a line to the given point.
QuadTo(Point<f32>, Point<f32>)
Draws a quadratic Bezier curve through the control point to the end point.
CubicTo(Point<f32>, Point<f32>, Point<f32>)
Draws a cubic Bezier curve through the two control points to the end point.
Close
Closes the current subpath.
Implementations§
Source§impl PathCommand
impl PathCommand
Sourcepub fn build_path(paths: &[Self]) -> Option<Path>
pub fn build_path(paths: &[Self]) -> Option<Path>
paths as a tiny-skia path; none for one with no segments.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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