pub struct SvgArc<S> {
pub from: Point<S>,
pub to: Point<S>,
pub radii: Vector<S>,
pub x_rotation: Angle<S>,
pub flags: ArcFlags,
}
Expand description
An elliptic arc curve segment using the SVG’s end-point notation.
Fields§
§from: Point<S>
§to: Point<S>
§radii: Vector<S>
§x_rotation: Angle<S>
§flags: ArcFlags
Implementations§
Source§impl<S: Scalar> SvgArc<S>
impl<S: Scalar> SvgArc<S>
Sourcepub fn is_straight_line(&self) -> bool
pub fn is_straight_line(&self) -> bool
Per SVG spec, this arc should be rendered as a line_to segment.
Do not convert an SvgArc
into an arc
if this returns true.
Sourcepub fn for_each_quadratic_bezier<F>(&self, cb: &mut F)where
F: FnMut(&QuadraticBezierSegment<S>),
pub fn for_each_quadratic_bezier<F>(&self, cb: &mut F)where
F: FnMut(&QuadraticBezierSegment<S>),
Approximates the arc with a sequence of quadratic bézier segments.
Sourcepub fn for_each_quadratic_bezier_with_t<F>(&self, cb: &mut F)
pub fn for_each_quadratic_bezier_with_t<F>(&self, cb: &mut F)
Approximates the arc with a sequence of quadratic bézier segments.
Sourcepub fn for_each_cubic_bezier<F>(&self, cb: &mut F)where
F: FnMut(&CubicBezierSegment<S>),
pub fn for_each_cubic_bezier<F>(&self, cb: &mut F)where
F: FnMut(&CubicBezierSegment<S>),
Approximates the arc with a sequence of cubic bézier segments.
Sourcepub fn for_each_flattened<F: FnMut(&LineSegment<S>)>(
&self,
tolerance: S,
cb: &mut F,
)
pub fn for_each_flattened<F: FnMut(&LineSegment<S>)>( &self, tolerance: S, cb: &mut F, )
Approximates the curve with sequence of line segments.
The tolerance
parameter defines the maximum distance between the curve and
its approximation.
Sourcepub fn for_each_flattened_with_t<F: FnMut(&LineSegment<S>, Range<S>)>(
&self,
tolerance: S,
cb: &mut F,
)
pub fn for_each_flattened_with_t<F: FnMut(&LineSegment<S>, Range<S>)>( &self, tolerance: S, cb: &mut F, )
Approximates the curve with sequence of line segments.
The tolerance
parameter defines the maximum distance between the curve and
its approximation.
The end of the t parameter range at the final segment is guaranteed to be equal to 1.0
.