Struct lyon_geom::Arc[][src]

pub struct Arc<S> {
    pub center: Point<S>,
    pub radii: Vector<S>,
    pub start_angle: Angle<S>,
    pub sweep_angle: Angle<S>,
    pub x_rotation: Angle<S>,
}
Expand description

An elliptic arc curve segment.

Fields

center: Point<S>radii: Vector<S>start_angle: Angle<S>sweep_angle: Angle<S>x_rotation: Angle<S>

Implementations

Create simple circle.

Convert from the SVG arc notation.

Convert to the SVG arc notation.

Approximate the arc with a sequence of quadratic bézier curves.

Approximate the arc with a sequence of cubic bézier curves.

Sample the curve at t (expecting t between 0 and 1).

Sample the curve’s tangent at t (expecting t between 0 and 1).

Sample the curve’s angle at t (expecting t between 0 and 1).

Return the sub-curve inside a given range of t.

This is equivalent splitting at the range’s end points.

Split this curve into two sub-curves.

Return the curve before the split point.

Return the curve after the split point.

Swap the direction of the segment.

Approximates the arc with a sequence of line segments.

Iterates through the curve invoking a callback at each point.

Returns the flattened representation of the curve as an iterator, starting after the current point.

Returns a conservative rectangle that contains the curve.

Returns a conservative rectangle that contains the curve.

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

Performs the conversion.

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

This method tests for !=.

Start of the curve.

End of the curve.

Sample the curve at t (expecting t between 0 and 1).

Sample x at t (expecting t between 0 and 1).

Sample y at t (expecting t between 0 and 1).

Sample the derivative at t (expecting t between 0 and 1).

Return the curve inside a given range of t. Read more

Split this curve into two sub-curves.

Return the curve before the split point.

Return the curve after the split point.

Swap the direction of the segment.

Compute the length of the segment using a flattened approximation.

Sample x derivative at t (expecting t between 0 and 1).

Sample y derivative at t (expecting t between 0 and 1).

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.