mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
auto merge of #5251 : mmatyas/servo/canvas_quadratic, r=jdm
Yet another small canvas patch.
This commit is contained in:
commit
2c85c1d312
4 changed files with 16 additions and 10 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue