pub trait PathBuilder<B: Backend> {
    // Required methods
    fn move_to(&mut self, point: Point) -> &mut Self;
    fn line_to(&mut self, point: Point) -> &mut Self;
    fn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self;
    fn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self;
    fn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self;
    fn rat_cubic_to(
        &mut self,
        p1: Point,
        p2: Point,
        p3: Point,
        w1: f32,
        w2: f32
    ) -> &mut Self;
    fn build(self) -> B::Path;
}
Expand description

Builds one closed path.

Required Methods§

source

fn move_to(&mut self, point: Point) -> &mut Self

Move end-point to.

source

fn line_to(&mut self, point: Point) -> &mut Self

Create line from end-point to point and update end-point.

source

fn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self

Create quadratic Bézier from end-point to p2 with p1 as control point.

source

fn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self

Create cubic Bézier from end-point to p3 with p1 and p2 as control points.

source

fn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self

Create rational quadratic Bézier from end-point to p2 with p1 as control point and w as its weight.

source

fn rat_cubic_to( &mut self, p1: Point, p2: Point, p3: Point, w1: f32, w2: f32 ) -> &mut Self

Create rational cubic Bézier from end-point to p3 with p1 and p2 as control points, and w1 and w2 their weights.

source

fn build(self) -> B::Path

Closes the path with a line if not yet closed and builds the path.

Consumes the builder; another one can be requested from the Context.

Object Safety§

This trait is not object safe.

Implementors§