Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/html/lib/canvas/Circle.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/lib/canvas/Circle.js')
-rw-r--r--html/lib/canvas/Circle.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/html/lib/canvas/Circle.js b/html/lib/canvas/Circle.js
new file mode 100644
index 0000000..dfe8283
--- /dev/null
+++ b/html/lib/canvas/Circle.js
@@ -0,0 +1,14 @@
+/**
+ Canvas control that draws a circle fitting the parameters specified in the
+ _bounds_ property.
+*/
+enyo.kind({
+ name: "enyo.canvas.Circle",
+ kind: enyo.canvas.Shape,
+ //@ protected
+ renderSelf: function(ctx) {
+ ctx.beginPath();
+ ctx.arc(this.bounds.l, this.bounds.t, this.bounds.w, 0, Math.PI*2);
+ this.draw(ctx);
+ }
+});