Struct lyon_path_builder::SvgPathBuilder
[−]
[src]
pub struct SvgPathBuilder<Builder: PathBuilder> { /* fields omitted */ }
Implements the Svg building interface on top of a PathBuilder.
Methods
impl<Builder: PathBuilder> SvgPathBuilder<Builder>
[src]
fn new(builder: Builder) -> SvgPathBuilder<Builder>
Trait Implementations
impl<Builder: PathBuilder> BaseBuilder for SvgPathBuilder<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) -> Vec2
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: PathBuilder> PathBuilder for SvgPathBuilder<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.
impl<Builder: PathBuilder> SvgBuilder for SvgPathBuilder<Builder>
[src]
fn relative_move_to(&mut self, to: Vec2)
fn relative_line_to(&mut self, to: Vec2)
fn relative_quadratic_bezier_to(&mut self, ctrl: Vec2, to: Vec2)
fn relative_cubic_bezier_to(&mut self, ctrl1: Vec2, ctrl2: Vec2, to: Vec2)
fn smooth_cubic_bezier_to(&mut self, ctrl2: Point, to: Point)
fn smooth_relative_cubic_bezier_to(&mut self, ctrl2: Vec2, to: Vec2)
fn smooth_quadratic_bezier_to(&mut self, to: Point)
fn smooth_relative_quadratic_bezier_to(&mut self, to: Vec2)
fn horizontal_line_to(&mut self, x: f32)
fn relative_horizontal_line_to(&mut self, dx: f32)
fn vertical_line_to(&mut self, y: f32)
fn relative_vertical_line_to(&mut self, dy: f32)
fn arc_to(&mut self,
to: Point,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags)
to: Point,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags)
fn relative_arc_to(&mut self,
to: Vec2,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags)
to: Vec2,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags)