canvas::canvas_data

Trait 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 svg_arc(
        &mut self,
        radius_x: f32,
        radius_y: f32,
        rotation_angle: f32,
        large_arc: bool,
        sweep: bool,
        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 svg_arc( &mut self, radius_x: f32, radius_y: f32, rotation_angle: f32, large_arc: bool, sweep: bool, end_point: Point2D<f32>, )

Source

fn finish(&mut self) -> Path

Implementors§