Struct lyon::path_builder::SvgPathBuilder
[−]
[src]
pub struct SvgPathBuilder<Builder> where Builder: PathBuilder { /* fields omitted */ }
Implements the Svg building interface on top of a PathBuilder.
Methods
impl<Builder> SvgPathBuilder<Builder> where Builder: PathBuilder
fn new(builder: Builder) -> SvgPathBuilder<Builder>
Trait Implementations
impl<Builder> SvgBuilder for SvgPathBuilder<Builder> where Builder: PathBuilder
fn relative_move_to(&mut self, to: TypedPoint2D<f32, UnknownUnit>)
fn relative_line_to(&mut self, to: TypedPoint2D<f32, UnknownUnit>)
fn relative_quadratic_bezier_to(&mut self,
ctrl: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
ctrl: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
fn relative_cubic_bezier_to(&mut self,
ctrl1: TypedPoint2D<f32, UnknownUnit>,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
ctrl1: TypedPoint2D<f32, UnknownUnit>,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
fn smooth_cubic_bezier_to(&mut self,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
fn smooth_relative_cubic_bezier_to(&mut self,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
fn smooth_quadratic_bezier_to(&mut self, to: TypedPoint2D<f32, UnknownUnit>)
fn smooth_relative_quadratic_bezier_to(&mut self,
to: TypedPoint2D<f32, UnknownUnit>)
to: TypedPoint2D<f32, UnknownUnit>)
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: TypedPoint2D<f32, UnknownUnit>,
radii: TypedPoint2D<f32, UnknownUnit>,
x_rotation: Length<f32, Rad>,
flags: ArcFlags)
to: TypedPoint2D<f32, UnknownUnit>,
radii: TypedPoint2D<f32, UnknownUnit>,
x_rotation: Length<f32, Rad>,
flags: ArcFlags)
fn relative_arc_to(&mut self,
to: TypedPoint2D<f32, UnknownUnit>,
radii: TypedPoint2D<f32, UnknownUnit>,
x_rotation: Length<f32, Rad>,
flags: ArcFlags)
to: TypedPoint2D<f32, UnknownUnit>,
radii: TypedPoint2D<f32, UnknownUnit>,
x_rotation: Length<f32, Rad>,
flags: ArcFlags)
fn svg_event(&mut self, event: SvgEvent)
impl<Builder> PathBuilder for SvgPathBuilder<Builder> where Builder: PathBuilder
fn quadratic_bezier_to(&mut self,
ctrl: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
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>)
ctrl1: TypedPoint2D<f32, UnknownUnit>,
ctrl2: TypedPoint2D<f32, UnknownUnit>,
to: TypedPoint2D<f32, UnknownUnit>)
fn path_event(&mut self, event: PathEvent)
fn with_svg(self) -> SvgPathBuilder<Self>
Returns a builder that support svg commands.
impl<Builder> BaseBuilder for SvgPathBuilder<Builder> where Builder: PathBuilder
type PathType = Builder::PathType
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) -> 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.