Struct lyon_path::ArcFlags

source ·
pub struct ArcFlags {
    pub large_arc: bool,
    pub sweep: bool,
}
Expand description

Flag parameters for arcs as described by the SVG specification.

For most situations using the SVG arc notation, there are four different arcs (two different ellipses, each with two different arc sweeps) that satisfy the arc parameters. The large_arc and sweep flags indicate which one of the four arcs are drawn, as follows:

See more examples in the SVG specification

Fields§

§large_arc: bool

Of the four candidate arc sweeps, two will represent an arc sweep of greater than or equal to 180 degrees (the “large-arc”), and two will represent an arc sweep of less than or equal to 180 degrees (the “small arc”). If large_arc is true, then one of the two larger arc sweeps will be chosen; otherwise, if large_arc is false, one of the smaller arc sweeps will be chosen.

§sweep: bool

If sweep is true, then the arc will be drawn in a “positive-angle” direction (the ellipse formula x=cx+rx*cos(theta) and y=cy+ry*sin(theta) is evaluated such that theta starts at an angle corresponding to the current point and increases positively until the arc reaches the destination position). A value of false causes the arc to be drawn in a “negative-angle” direction (theta starts at an angle value corresponding to the current point and decreases until the arc reaches the destination position).

Trait Implementations§

source§

impl Clone for ArcFlags

source§

fn clone(&self) -> ArcFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ArcFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ArcFlags

source§

fn default() -> ArcFlags

Returns the “default value” for a type. Read more
source§

impl PartialEq<ArcFlags> for ArcFlags

source§

fn eq(&self, other: &ArcFlags) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ArcFlags

source§

impl StructuralPartialEq for ArcFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.