Trait carnelian::render::generic::PathBuilder
source · 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.
Object Safety§
This trait is not object safe.