Struct lyon_path_builder::FlatteningBuilder
[−]
[src]
pub struct FlatteningBuilder<Builder> { // some fields omitted }
Generates flattened paths
Methods
impl<Builder: BaseBuilder> FlatteningBuilder<Builder>
[src]
fn new(builder: Builder, tolerance: f32) -> FlatteningBuilder<Builder>
fn set_tolerance(&mut self, tolerance: f32)
Trait Implementations
impl<Builder: BaseBuilder> BaseBuilder for FlatteningBuilder<Builder>
[src]
type PathType = Builder::PathType
The type of object that is created by this builder.
fn move_to(&mut self, to: Point)
Sets the current position in preparation for the next sub-path. If the current sub-path contains edges, this ends the sub-path without closing it. Read more
fn line_to(&mut self, to: Point)
Adds a line segment to the current sub-path and set the current position.
fn close(&mut self)
Closes the current sub path and sets the current position to the first position of this the current sub-path. Read more
fn current_position(&self) -> Point
fn build(self) -> Builder::PathType
Builds a path object and resets the builder so that it can be used again.
fn build_and_reset(&mut self) -> Builder::PathType
Builds a path object and resets the builder so that it can be used again.
fn flat_event(&mut self, event: FlattenedEvent)
fn flattened(self, tolerance: f32) -> FlatteningBuilder<Self>
Returns a builder that approximates all curves with sequences of line segments.
impl<Builder: BaseBuilder> PathBuilder for FlatteningBuilder<Builder>
[src]
fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point)
fn cubic_bezier_to(&mut self, ctrl1: Point, ctrl2: Point, to: Point)
fn path_event(&mut self, event: PathEvent)
fn with_svg(self) -> SvgPathBuilder<Self>
Returns a builder that support svg commands.