pub struct PathBuilder { /* fields omitted */ }
Builder for Path2D.
use footile::PathBuilder;
let path = PathBuilder::new()
.move_to(10.0, 10.0)
.line_to(90.0, 90.0)
.build();
Create a new PathBuilder.
Use absolute coordinates for subsequent operations.
Use relative coordinates for subsequent operations.
This is the default setting.
Close current sub-path and move pen to origin.
Move pen to a point.
bx
X-position of point.
by
Y-position of point.
Add a line from pen to a point.
bx
X-position of end point.
by
Y-position of end point.
Add a quadratic bézier spline.
The points are A (current pen position), B (control point), and C
(spline end point).
bx
X-position of control point.
by
Y-position of control point.
cx
X-position of end point.
cy
Y-position of end point.
Add a cubic bézier spline.
The points are A (current pen position), B (first control point), C
(second control point) and D (spline end point).
bx
X-position of first control point.
by
Y-position of first control point.
cx
X-position of second control point.
cy
Y-position of second control point.
dx
X-position of end point.
dy
Y-position of end point.
Set pen stroke width.
All subsequent path points will be affected, until the stroke width
is changed again.
Build path from specified operations.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static