Struct piet_common::kurbo::SvgArc
pub struct SvgArc {
pub from: Point,
pub to: Point,
pub radii: Vec2,
pub x_rotation: f64,
pub large_arc: bool,
pub sweep: bool,
}Expand description
A single SVG arc segment.
Fields
from: PointThe arc’s start point.
to: PointThe arc’s end point.
radii: Vec2The arc’s radii, where the vector’s x-component is the radius in the
positive x direction after applying x_rotation.
x_rotation: f64How much the arc is rotated, in radians.
large_arc: boolDoes this arc sweep through more than π radians?
sweep: boolDetermines if the arc should begin moving at positive angles.
Implementations
impl SvgArc
impl SvgArc
pub fn is_straight_line(&self) -> bool
pub fn is_straight_line(&self) -> bool
Checks that arc is actually a straight line.
In this case, it can be replaced with a LineTo.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SvgArc
impl Send for SvgArc
impl Sync for SvgArc
impl Unpin for SvgArc
impl UnwindSafe for SvgArc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.