Struct lyon::tessellation::path_stroke::StrokeBuilder
[−]
[src]
pub struct StrokeBuilder<'l, Output> where Output: 'l { /* fields omitted */ }
A builder that tessellates a stroke directly without allocating any intermediate data structure.
Methods
impl<'l, Output> StrokeBuilder<'l, Output> where Output: 'l + GeometryBuilder<StrokeVertex>
fn new(options: &StrokeOptions,
builder: &'l mut Output)
-> StrokeBuilder<'l, Output>
builder: &'l mut Output)
-> StrokeBuilder<'l, Output>
fn set_options(&mut self, options: &StrokeOptions)
Trait Implementations
impl<'l, Output> BaseBuilder for StrokeBuilder<'l, Output> where Output: 'l + GeometryBuilder<StrokeVertex>
type PathType = Result<Count, ()>
The type of object that is created by this builder.
fn move_to(&mut self, to: TypedPoint2D<f32, UnknownUnit>)
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>)
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) -> TypedPoint2D<f32, UnknownUnit>
fn build(self) -> Result<Count, ()>
Builds a path object and resets the builder so that it can be used again.
fn build_and_reset(&mut self) -> Result<Count, ()>
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.