Struct iced::widget::canvas::path::Builder

source ·
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.

This essentially draws a straight line segment from the current position to a, but fits a circular arc of radius tangent to that segment and tangent to the line between a and b.

With another .line_to(b), the result will be a path connecting the starting point and b with straight line segments towards a and a circular arc smoothing out the corner at a.

See the HTML5 specification of arcTo for more details and examples.

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.

Trait Implementations§

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

Auto Trait Implementations§

Blanket Implementations§

Convert the source color to the destination color using the specified method
Convert the source color to the destination color using the bradford method by default
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.

Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
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
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
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.
Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more