logo
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 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 curve with sequence of line segments.

The tolerance parameter defines the maximum distance between the curve and its approximation.

Approximates the curve with sequence of line segments.

The tolerance parameter defines the maximum distance between the curve and its approximation.

The end of the t parameter range at the final segment is guaranteed to be equal to 1.0.

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

Converts to this type from the input type.

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.

Approximates the curve with sequence of line segments. Read more

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

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.