aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorMátyás Mustoha <mmatyas@inf.u-szeged.hu>2015-02-18 15:26:49 +0100
committerMátyás Mustoha <mmatyas@inf.u-szeged.hu>2015-03-09 21:55:40 +0100
commitc98bca6130c8f0bedd4f24954e5e2fdbf2af81d5 (patch)
tree514fae19aa1a7416ca6ca9990346a9765ec0508d /components/script/dom
parent7cd776b74f7996894965deb8700adb6ef46d705d (diff)
downloadservo-c98bca6130c8f0bedd4f24954e5e2fdbf2af81d5.tar.gz
servo-c98bca6130c8f0bedd4f24954e5e2fdbf2af81d5.zip
Canvas: added arc().
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/canvasrenderingcontext2d.rs5
-rw-r--r--components/script/dom/webidls/CanvasRenderingContext2D.webidl2
2 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs
index 8367e27d05e..d481aca911f 100644
--- a/components/script/dom/canvasrenderingcontext2d.rs
+++ b/components/script/dom/canvasrenderingcontext2d.rs
@@ -160,6 +160,11 @@ impl<'a> CanvasRenderingContext2DMethods for JSRef<'a, CanvasRenderingContext2D>
Point2D(x as f32, y as f32))).unwrap();
}
+ fn Arc(self, x: f64, y: f64, r: f64, start: f64, end: f64, ccw: bool) {
+ self.renderer.send(CanvasMsg::Arc(Point2D(x as f32, y as f32), r as f32,
+ start as f32, end as f32, ccw)).unwrap();
+ }
+
fn StrokeStyle(self) -> StringOrCanvasGradientOrCanvasPattern {
// FIXME(pcwalton, #4761): This is not spec-compliant. See:
//
diff --git a/components/script/dom/webidls/CanvasRenderingContext2D.webidl b/components/script/dom/webidls/CanvasRenderingContext2D.webidl
index 487ce819b25..f9a4c7b68f8 100644
--- a/components/script/dom/webidls/CanvasRenderingContext2D.webidl
+++ b/components/script/dom/webidls/CanvasRenderingContext2D.webidl
@@ -138,7 +138,7 @@ interface CanvasPathMethods {
//void rect(double x, double y, double w, double h);
- //void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
+ void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
// NOT IMPLEMENTED [LenientFloat] void ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, boolean anticlockwise);
};