Struct lyon::path::Builder
[−]
[src]
pub struct Builder { /* fields omitted */ }
Builds path object using the FlatPathBuilder interface.
See the lyon_path_builder module documentation.
Methods
impl Builder
[src]
fn new() -> Builder
[src]
fn with_capacity(cap: usize) -> Builder
[src]
fn with_svg(self) -> SvgPathBuilder<Builder>
[src]
fn flattened(self, tolerance: f32) -> FlatteningBuilder<Builder>
[src]
Trait Implementations
impl FlatPathBuilder for Builder
[src]
type PathType = Path
The type of object that is created by this builder.
fn move_to(&mut self, to: TypedPoint2D<f32, UnknownUnit>)
[src]
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: TypedPoint2D<f32, UnknownUnit>)
[src]
Adds a line segment to the current sub-path and set the current position.
fn close(&mut self)
[src]
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) -> TypedPoint2D<f32, UnknownUnit>
[src]
fn build(self) -> Path
[src]
Builds a path object and resets the builder so that it can be used again.
fn build_and_reset(&mut self) -> Path
[src]
Builds a path object and resets the builder so that it can be used again.
fn flat_event(&mut self, event: FlattenedEvent)
[src]
fn flattened(self, tolerance: f32) -> FlatteningBuilder<Self>
[src]
Returns a builder that approximates all curves with sequences of line segments.
impl PathBuilder for Builder
[src]
fn quadratic_bezier_to(
&mut self,
ctrl: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>
)
[src]
&mut self,
ctrl: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>
)
fn cubic_bezier_to(
&mut self,
ctrl1: TypedPoint2D<f32, UnknownUnit>,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>
)
[src]
&mut self,
ctrl1: TypedPoint2D<f32, UnknownUnit>,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>
)
fn path_event(&mut self, event: PathEvent)
[src]
fn with_svg(self) -> SvgPathBuilder<Self>
[src]
Returns a builder that support svg commands.