logo
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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.