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
.
Trait Implementations§
impl<S: Copy> Copy for SvgArc<S>
impl<S> StructuralPartialEq for SvgArc<S>
Auto Trait Implementations§
impl<S> Freeze for SvgArc<S>where
S: Freeze,
impl<S> RefUnwindSafe for SvgArc<S>where
S: RefUnwindSafe,
impl<S> Send for SvgArc<S>where
S: Send,
impl<S> Sync for SvgArc<S>where
S: Sync,
impl<S> Unpin for SvgArc<S>where
S: Unpin,
impl<S> UnwindSafe for SvgArc<S>where
S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)