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>
[src]
Trait Implementations
impl<Builder: PathBuilder> FlatPathBuilder 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)
[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) -> Builder::PathType
[src]
Builds a path object and resets the builder so that it can be used again.
fn build_and_reset(&mut self) -> Builder::PathType
[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<Builder: PathBuilder> PathBuilder for SvgPathBuilder<Builder>
[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 path_event(&mut self, event: PathEvent)
[src]
fn with_svg(self) -> SvgPathBuilder<Self>
[src]
Returns a builder that support svg commands.
impl<Builder: PathBuilder> SvgBuilder for SvgPathBuilder<Builder>
[src]
fn relative_move_to(&mut self, to: Vec2)
[src]
fn relative_line_to(&mut self, to: Vec2)
[src]
fn relative_quadratic_bezier_to(&mut self, ctrl: Vec2, to: Vec2)
[src]
fn relative_cubic_bezier_to(&mut self, ctrl1: Vec2, ctrl2: Vec2, to: Vec2)
[src]
fn smooth_cubic_bezier_to(&mut self, ctrl2: Point, to: Point)
[src]
fn smooth_relative_cubic_bezier_to(&mut self, ctrl2: Vec2, to: Vec2)
[src]
fn smooth_quadratic_bezier_to(&mut self, to: Point)
[src]
fn smooth_relative_quadratic_bezier_to(&mut self, to: Vec2)
[src]
fn horizontal_line_to(&mut self, x: f32)
[src]
fn relative_horizontal_line_to(&mut self, dx: f32)
[src]
fn vertical_line_to(&mut self, y: f32)
[src]
fn relative_vertical_line_to(&mut self, dy: f32)
[src]
fn arc_to(
&mut self,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags,
to: Point
)
[src]
&mut self,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags,
to: Point
)
fn relative_arc_to(
&mut self,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags,
to: Vec2
)
[src]
&mut self,
radii: Vec2,
x_rotation: Radians<f32>,
flags: ArcFlags,
to: Vec2
)