pub trait PathBuilder<B: Backend> {
// Required methods
fn move_to(&mut self, point: Point) -> &mut Self;
fn line_to(&mut self, point: Point) -> &mut Self;
fn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self;
fn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self;
fn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self;
fn rat_cubic_to(
&mut self,
p1: Point,
p2: Point,
p3: Point,
w1: f32,
w2: f32,
) -> &mut Self;
fn build(self) -> B::Path;
}
Expand description
Builds one closed path.
Required Methods§
Sourcefn line_to(&mut self, point: Point) -> &mut Self
fn line_to(&mut self, point: Point) -> &mut Self
Create line from end-point to point and update end-point.
Sourcefn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self
fn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self
Create quadratic Bézier from end-point to p2
with p1
as control point.
Sourcefn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self
fn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self
Create cubic Bézier from end-point to p3
with p1
and p2
as control points.
Sourcefn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self
fn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self
Create rational quadratic Bézier from end-point to p2
with p1
as control point
and w
as its weight.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.