Struct lyon_tessellation::StrokeBuilder
[−]
[src]
pub struct StrokeBuilder<'l> { /* fields omitted */ }
A builder that tessellates a stroke directly without allocating any intermediate data structure.
Methods
impl<'l> StrokeBuilder<'l>
[src]
pub fn new(
options: &StrokeOptions,
builder: &'l mut GeometryBuilder<Vertex>
) -> Self
[src]
options: &StrokeOptions,
builder: &'l mut GeometryBuilder<Vertex>
) -> Self
pub fn set_options(&mut self, options: &StrokeOptions)
[src]
Trait Implementations
impl<'l> FlatPathBuilder for StrokeBuilder<'l>
[src]
type PathType = ()
The type of object that is created by this builder.
fn move_to(&mut self, to: Point)
[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: Point)
[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) -> Point
[src]
fn build(self)
[src]
Builds a path object and resets the builder so that it can be used again.
fn build_and_reset(&mut self)
[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<'l> PathBuilder for StrokeBuilder<'l>
[src]
fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point)
[src]
fn cubic_bezier_to(&mut self, ctrl1: Point, ctrl2: Point, to: Point)
[src]
fn arc(
&mut self,
center: Point,
radii: Vector,
sweep_angle: Angle,
x_rotation: Angle
)
[src]
&mut self,
center: Point,
radii: Vector,
sweep_angle: Angle,
x_rotation: Angle
)
fn path_event(&mut self, event: PathEvent)
[src]
fn with_svg(self) -> SvgPathBuilder<Self>
[src]
Returns a builder that support svg commands.