auto merge of #5251 : mmatyas/servo/canvas_quadratic, r=jdm

Yet another small canvas patch.
This commit is contained in:
bors-servo 2015-03-20 04:27:47 -06:00
commit 2c85c1d312
4 changed files with 16 additions and 10 deletions

View file

@ -157,6 +157,11 @@ impl<'a> CanvasRenderingContext2DMethods for JSRef<'a, CanvasRenderingContext2D>
self.renderer.send(CanvasMsg::LineTo(Point2D(x as f32, y as f32))).unwrap();
}
fn QuadraticCurveTo(self, cpx: f64, cpy: f64, x: f64, y: f64) {
self.renderer.send(CanvasMsg::QuadraticCurveTo(Point2D(cpx as f32, cpy as f32),
Point2D(x as f32, y as f32))).unwrap();
}
fn BezierCurveTo(self, cp1x: f64, cp1y: f64, cp2x: f64, cp2y: f64, x: f64, y: f64) {
self.renderer.send(CanvasMsg::BezierCurveTo(Point2D(cp1x as f32, cp1y as f32),
Point2D(cp2x as f32, cp2y as f32),

View file

@ -126,7 +126,7 @@ interface CanvasPathMethods {
void closePath();
void moveTo(/*unrestricted*/ double x, /*unrestricted*/ double y);
void lineTo(double x, double y);
//void quadraticCurveTo(double cpx, double cpy, double x, double y);
void quadraticCurveTo(double cpx, double cpy, double x, double y);
void bezierCurveTo(/*unrestricted*/ double cp1x,
/*unrestricted*/ double cp1y,