[][src]Struct raqote::PathBuilder

pub struct PathBuilder { /* fields omitted */ }

A helper struct used for constructing a Path.

Methods

impl PathBuilder[src]

pub fn new() -> PathBuilder[src]

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

Moves the current point to x, y

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

Adds a line segment from the current point to x, y

pub fn quad_to(&mut self, cx: f32, cy: f32, x: f32, y: f32)[src]

Adds a quadratic bezier from the current point to x, y, using a control point of cx, cy

pub fn rect(&mut self, x: f32, y: f32, width: f32, height: f32)[src]

Adds a rect to the path

pub fn cubic_to(
    &mut self,
    cx1: f32,
    cy1: f32,
    cx2: f32,
    cy2: f32,
    x: f32,
    y: f32
)
[src]

Adds a cubic bezier from the current point to x, y, using control points cx1, cy1 and cx2, cy2

pub fn close(&mut self)[src]

Closes the current subpath

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

Adds an arc approximated by quadratic beziers with center x, y and radius r from angle1 and to angle2

pub fn finish(self) -> Path[src]

Completes the current path

Trait Implementations

impl From<Path> for PathBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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.

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

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

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