pub fn quad(&mut self, control_x: f64, control_y: f64, x: f64, y: f64) {
        if let Some(last_pos) = self.last_pos {
            let quad = PathItem::Quad(Quad {
                start: last_pos,
                end: Point(x, y),
                control1: Point(control_x, control_y),
            });
            let left_point = quad.left_point();
            if last_pos != left_point {
                self.push(PathItem::Line(Line(last_pos, left_point)));
            }
            self.set_pos(quad.right_point());
            self.push(quad);
        } else {
            panic!("PathBuilder::move_to() is required before quad");
        }
    }
/// Add a quadratic bezier curve.
Add a quadratic bezier curve.
Add a quadratic bezier curve .
pub fn quad(&mut self, control_x: f64, control_y: f64, x: f64, y: f64) {
        if let Some(last_pos) = self.last_pos {
            let quad = PathItem::Quad(Quad {
                start: last_pos,
                end: Point(x, y),
                control1: Point(control_x, control_y),
            });
            let left_point = quad.left_point();
            if last_pos != left_point {
                self.push(PathItem::Line(Line(last_pos, left_point)));
            }
            self.set_pos(quad.right_point());
            self.push(quad);
        } else {
            panic!("PathBuilder::move_to() is required before quad");
        }
    }
pub fn quad ( & mut self , control_x : f64 , control_y : f64 , x : f64 , y : f64 ) { if let Some ( last_pos ) = self . last_pos { let quad = PathItem :: Quad ( Quad { start : last_pos , end : Point ( x , y ) , control1 : Point ( control_x , control_y ) , } ) ; let left_point = quad . left_point ( ) ; if last_pos != left_point { self . push ( PathItem :: Line ( Line ( last_pos , left_point ) ) ) ; } self . set_pos ( quad . right_point ( ) ) ; self . push ( quad ) ; } else { panic ! ( " " ) ; } }
Add a quadratic bezier curve.
Add a quadratic bezier curve .
&mut self
control_x
f64
control_y
f64
x
f64
y
f64