pub struct Builder { /* private fields */ }
Available on crate feature
canvas
only.Implementations
sourceimpl Builder
impl Builder
sourcepub fn move_to(&mut self, point: Point)
pub fn move_to(&mut self, point: Point)
Moves the starting point of a new sub-path to the given Point
.
sourcepub fn line_to(&mut self, point: Point)
pub fn line_to(&mut self, point: Point)
Connects the last point in the Path
to the given Point
with a
straight line.
sourcepub fn arc_to(&mut self, a: Point, b: Point, radius: f32)
pub fn arc_to(&mut self, a: Point, b: Point, radius: f32)
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.
sourcepub fn ellipse(&mut self, arc: Elliptical)
pub fn ellipse(&mut self, arc: Elliptical)
Adds an ellipse to the Path
using a clockwise direction.
sourcepub fn bezier_curve_to(&mut self, control_a: Point, control_b: Point, to: Point)
pub fn bezier_curve_to(&mut self, control_a: Point, control_b: Point, to: Point)
Adds a cubic Bézier curve to the Path
given its two control points
and its end point.
sourcepub fn quadratic_curve_to(&mut self, control: Point, to: Point)
pub fn quadratic_curve_to(&mut self, control: Point, to: Point)
Adds a quadratic Bézier curve to the Path
given its control point
and its end point.
sourcepub fn rectangle(&mut self, top_left: Point, size: Size<f32>)
pub fn rectangle(&mut self, top_left: Point, size: Size<f32>)
Adds a rectangle to the Path
given its top-left corner coordinate
and its Size
.
sourcepub fn circle(&mut self, center: Point, radius: f32)
pub fn circle(&mut self, center: Point, radius: f32)
Adds a circle to the Path
given its center coordinate and its
radius.
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more