[][src]Struct nanachi::path_builder::PathBuilder

pub struct PathBuilder { /* fields omitted */ }

Path builder.

Implementations

impl PathBuilder[src]

pub fn new() -> PathBuilder[src]

Create PathBuilder.

pub fn move_to(&mut self, x: f64, y: f64)[src]

Set current position.

pub fn line_to(&mut self, x: f64, y: f64)[src]

Add a segment that from current position to specified position. And then set the end position to current position.

pub fn arc(&mut self, x: f64, y: f64, radius: f64, angle1: f64, angle2: f64)[src]

Add an arc.

pub fn ellipse(
    &mut self,
    x: f64,
    y: f64,
    radius_x: f64,
    radius_y: f64,
    rotation: f64,
    angle1: f64,
    angle2: f64
)
[src]

Add an ellipse.

pub fn ellipse_from_endpoint(
    &mut self,
    radius_x: f64,
    radius_y: f64,
    rotation: f64,
    large: bool,
    clockwise: bool,
    x: f64,
    y: f64
)
[src]

Add an endpoint-parameterized ellipse.

pub fn quad(&mut self, control_x: f64, control_y: f64, x: f64, y: f64)[src]

Add a quadratic bezier curve.

pub fn cubic(
    &mut self,
    control_x1: f64,
    control_y1: f64,
    control_x2: f64,
    control_y2: f64,
    x: f64,
    y: f64
)
[src]

Add a cubic bezier curve.

pub fn close(&mut self)[src]

Close the path.

pub fn end(&mut self) -> Path[src]

Return the built Path.

pub fn current_pos(&self) -> Option<(f64, f64)>[src]

Return current position.

Trait Implementations

impl Clone for PathBuilder[src]

impl Debug for PathBuilder[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> SetParameter for T

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.