Trait lyon_path_builder::PathBuilder [] [src]

pub trait PathBuilder: Sized {
    type PathType;
    fn move_to(&mut self, to: Point);
    fn line_to(&mut self, to: Point);
    fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point);
    fn cubic_bezier_to(&mut self, ctrl1: Point, ctrl2: Point, to: Point);
    fn close(&mut self);
    fn current_position(&self) -> Point;
    fn build(self) -> Self::PathType;

    fn path_event(&mut self, event: PathEvent) { ... }
    fn with_svg(self) -> SvgPathBuilder<Self> { ... }
    fn flattened(self, tolerance: f32) -> FlattenedBuilder<Self> { ... }
}

The base path building interface. More elaborate interfaces are built on top of the provided primitives.

Associated Types

type PathType

Required Methods

fn move_to(&mut self, to: Point)

fn line_to(&mut self, to: Point)

fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point)

fn cubic_bezier_to(&mut self, ctrl1: Point, ctrl2: Point, to: Point)

fn close(&mut self)

fn current_position(&self) -> Point

fn build(self) -> Self::PathType

Provided Methods

fn path_event(&mut self, event: PathEvent)

fn with_svg(self) -> SvgPathBuilder<Self>

Returns a builder that support svg commands.

fn flattened(self, tolerance: f32) -> FlattenedBuilder<Self>

Returns a builder that approximates all curves with sequences of line segments.

Implementors