pub struct Builder { /* private fields */ }canvas only.Implementations§
Source§impl 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.
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.
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)
pub fn rectangle(&mut self, top_left: Point, size: Size)
Adds a rectangle to the Path given its top-left corner coordinate
and its Size.
Sourcepub fn rounded_rectangle(&mut self, top_left: Point, size: Size, radius: Radius)
pub fn rounded_rectangle(&mut self, top_left: Point, size: Size, radius: Radius)
Adds a rounded rectangle to the Path given its top-left
corner coordinate its Size and border::Radius.
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.