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_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(Point<S>)>(&self, tolerance: S, cb: &mut F)
pub fn for_each_flattened<F: FnMut(Point<S>)>(&self, tolerance: S, cb: &mut F)
Approximates the arc with a sequence of line segments.
Trait Implementations§
source§impl<S: PartialEq> PartialEq for SvgArc<S>
impl<S: PartialEq> PartialEq for SvgArc<S>
impl<S: Copy> Copy for SvgArc<S>
impl<S> StructuralPartialEq for SvgArc<S>
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more