Enum ochre::PathCmd[][src]

pub enum PathCmd {
    Move(Vec2),
    Line(Vec2),
    Quadratic(Vec2Vec2),
    Cubic(Vec2Vec2Vec2),
    Conic(Vec2Vec2f32),
    Close,
}

A single command in a 2-dimensional vector path.

Variants

Move(Vec2)
Line(Vec2)
Quadratic(Vec2Vec2)
Cubic(Vec2Vec2Vec2)
Conic(Vec2Vec2f32)
Close

Implementations

impl PathCmd[src]

pub fn transform(&self, transform: Transform) -> PathCmd[src]

Applies the given transform to the path command.

pub fn flatten(
    &self,
    last: Vec2,
    tolerance: f32,
    mut callback: impl FnMut(PathCmd)
)
[src]

Computes a piecewise-linear approximation of the given path command to within the supplied parametric error tolerance.

Trait Implementations

impl Clone for PathCmd[src]

impl Copy for PathCmd[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.