logo
pub struct Builder { /* private fields */ }
Available on crate feature canvas only.
Expand description

A Path builder.

Once a Path is built, it can no longer be mutated.

Implementations

Creates a new Builder.

Moves the starting point of a new sub-path to the given Point.

Connects the last point in the Path to the given Point with a straight line.

Adds an Arc to the Path from start_angle to end_angle in a clockwise direction.

Adds a circular arc to the Path with the given control points and radius.

The arc is connected to the previous point by a straight line, if necessary.

Adds an ellipse to the Path using a clockwise direction.

Adds a cubic Bézier curve to the Path given its two control points and its end point.

Adds a quadratic Bézier curve to the Path given its control point and its end point.

Adds a rectangle to the Path given its top-left corner coordinate and its Size.

Adds a circle to the Path given its center coordinate and its radius.

Closes the current sub-path in the Path with a straight line to the starting point.

Builds the Path of this Builder.

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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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.