pub struct Path { /* private fields */ }
Expand description

A collection of verbs (move_to(), line_to(), bezier_to(), etc.) describing one or more contours.

Implementations

Memory usage in bytes

Starts new sub-path with specified point as first point.

Adds line segment from the last point in the path to the specified point.

Adds cubic bezier segment from last point in the path via two control points to the specified point.

Adds quadratic bezier segment from last point in the path via a control point to the specified point.

Closes current sub-path with a line segment.

Sets the current sub-path winding, see Solidity

Creates new circle arc shaped sub-path. The arc center is at cx,cy, the arc radius is r, and the arc is drawn from angle a0 to a1, and swept in direction dir (Winding) Angles are specified in radians.

Adds an arc segment at the corner defined by the last path point, and two specified points.

Creates new rectangle shaped sub-path.

Creates new rounded rectangle shaped sub-path.

Creates new rounded rectangle shaped sub-path with varying radii for each corner.

Creates new ellipse shaped sub-path.

Creates new circle shaped sub-path.

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

Appends a MoveTo segment. Read more

Appends a LineTo segment.

Appends a QuadTo segment.

Appends a CurveTo segment.

Appends a ClosePath segment. Read more

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

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

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.