Struct rasterize::PathBuilder[][src]

pub struct PathBuilder { /* fields omitted */ }

Path builder similar to Canvas/Cairo interface.

Implementations

impl PathBuilder[src]

pub fn new() -> Self[src]

pub fn from_path(path: Path) -> Self[src]

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

Build path

pub fn append_svg_path(
    &mut self,
    string: impl AsRef<[u8]>
) -> Result<&mut Self, SvgPathParserError>
[src]

Extend path from string, which is specified in the same format as SVGs path element.

pub fn move_to(&mut self, p: impl Into<Point>) -> &mut Self[src]

Move current position, ending current subpath

pub fn close(&mut self) -> &mut Self[src]

Close current subpath

pub fn line_to(&mut self, p: impl Into<Point>) -> &mut Self[src]

Add line from the current position to the specified point

pub fn quad_to(
    &mut self,
    p1: impl Into<Point>,
    p2: impl Into<Point>
) -> &mut Self
[src]

Add quadratic bezier curve

pub fn quad_smooth_to(&mut self, p2: impl Into<Point>) -> &mut Self[src]

Add smooth quadratic bezier curve

pub fn cubic_to(
    &mut self,
    p1: impl Into<Point>,
    p2: impl Into<Point>,
    p3: impl Into<Point>
) -> &mut Self
[src]

Add cubic beizer curve

pub fn cubic_smooth_to(
    &mut self,
    p2: impl Into<Point>,
    p3: impl Into<Point>
) -> &mut Self
[src]

Add smooth cubic bezier curve

pub fn arc_to(
    &mut self,
    radii: impl Into<Point>,
    x_axis_rot: Scalar,
    large: bool,
    sweep: bool,
    p: impl Into<Point>
) -> &mut Self
[src]

Add elliptic arc segment

pub fn circle(&mut self, radius: Scalar) -> &mut Self[src]

Add circle with the center at current position and provided radius.

Current position is not changed after invocation.

pub fn rbox(
    &mut self,
    size: impl Into<Point>,
    radii: impl Into<Point>
) -> &mut Self
[src]

Add box with rounded corners, with current position being low-x and low-y coordinate

pub fn position(&self) -> Point[src]

Current possition of the builder

Trait Implementations

impl Clone for PathBuilder[src]

impl Default 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> 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.