mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Canvas: added lineTo().
This commit is contained in:
parent
fed878710c
commit
774cc4a93a
14 changed files with 60 additions and 45 deletions
|
@ -150,6 +150,10 @@ impl<'a> CanvasRenderingContext2DMethods for JSRef<'a, CanvasRenderingContext2D>
|
|||
self.renderer.send(CanvasMsg::MoveTo(Point2D(x as f32, y as f32))).unwrap();
|
||||
}
|
||||
|
||||
fn LineTo(self, x: f64, y: f64) {
|
||||
self.renderer.send(CanvasMsg::LineTo(Point2D(x as f32, y as f32)));
|
||||
}
|
||||
|
||||
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