Trait canvas::canvas_data::GenericPathBuilder

source ·
pub trait GenericPathBuilder {
    // Required methods
    fn arc(
        &mut self,
        origin: Point2D<f32>,
        radius: f32,
        start_angle: f32,
        end_angle: f32,
        anticlockwise: bool,
    );
    fn bezier_curve_to(
        &mut self,
        control_point1: &Point2D<f32>,
        control_point2: &Point2D<f32>,
        control_point3: &Point2D<f32>,
    );
    fn close(&mut self);
    fn ellipse(
        &mut self,
        origin: Point2D<f32>,
        radius_x: f32,
        radius_y: f32,
        rotation_angle: f32,
        start_angle: f32,
        end_angle: f32,
        anticlockwise: bool,
    );
    fn get_current_point(&mut self) -> Option<Point2D<f32>>;
    fn line_to(&mut self, point: Point2D<f32>);
    fn move_to(&mut self, point: Point2D<f32>);
    fn quadratic_curve_to(
        &mut self,
        control_point: &Point2D<f32>,
        end_point: &Point2D<f32>,
    );
    fn finish(&mut self) -> Path;
}
Expand description

A generic PathBuilder that abstracts the interface for azure’s and raqote’s PathBuilder. TODO: De-abstract now that Azure is removed?

Required Methods§

source

fn arc( &mut self, origin: Point2D<f32>, radius: f32, start_angle: f32, end_angle: f32, anticlockwise: bool, )

source

fn bezier_curve_to( &mut self, control_point1: &Point2D<f32>, control_point2: &Point2D<f32>, control_point3: &Point2D<f32>, )

source

fn close(&mut self)

source

fn ellipse( &mut self, origin: Point2D<f32>, radius_x: f32, radius_y: f32, rotation_angle: f32, start_angle: f32, end_angle: f32, anticlockwise: bool, )

source

fn get_current_point(&mut self) -> Option<Point2D<f32>>

source

fn line_to(&mut self, point: Point2D<f32>)

source

fn move_to(&mut self, point: Point2D<f32>)

source

fn quadratic_curve_to( &mut self, control_point: &Point2D<f32>, end_point: &Point2D<f32>, )

source

fn finish(&mut self) -> Path

Implementors§