aboutsummaryrefslogtreecommitdiff
path: root/js/tools/OvalTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-05-22 13:22:26 -0700
committerPushkar Joshi2012-05-22 13:22:26 -0700
commit01dbc1f329a95bc7e3b93224543d88ad5bdbd315 (patch)
treeceb527713554f506c537168e36a10452cd09ad10 /js/tools/OvalTool.js
parentb9262c831952e77135b79c2de7c455d5e7ff0589 (diff)
parentc37a876b373ddc7cb19277aaeaa6bb2d2d5a50ac (diff)
downloadninja-01dbc1f329a95bc7e3b93224543d88ad5bdbd315.tar.gz
Merge branch 'master' into brushtool
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-xjs/tools/OvalTool.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js
index e8e88d1d..ce812398 100755
--- a/js/tools/OvalTool.js
+++ b/js/tools/OvalTool.js
@@ -39,8 +39,8 @@ exports.OvalTool = Montage.create(ShapeTool, {
39 39
40 var innerRadius = this.options.innerRadius.value / 100; 40 var innerRadius = this.options.innerRadius.value / 100;
41 41
42 var strokeColor = this.application.ninja.colorController.colorToolbar.stroke.webGlColor; 42 var strokeColor = this.options.stroke.webGlColor;
43 var fillColor = this.application.ninja.colorController.colorToolbar.fill.webGlColor; 43 var fillColor = this.options.fill.webGlColor;
44 44
45 // for default stroke and fill/no materials 45 // for default stroke and fill/no materials
46 var strokeMaterial = null; 46 var strokeMaterial = null;
@@ -66,9 +66,9 @@ exports.OvalTool = Montage.create(ShapeTool, {
66 var world = this.getGLWorld(canvas, this.options.use3D); 66 var world = this.getGLWorld(canvas, this.options.use3D);
67 67
68 var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); 68 var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2);
69 var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); 69 var yOffset = -(canvas.height/2 - (top - canvas.offsetTop + h/2));
70 70
71 var oval = new Circle(); //GLCircle(); 71 var oval = Object.create(Circle, {});
72 oval.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, innerRadius, strokeMaterial, fillMaterial, strokeStyle); 72 oval.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, innerRadius, strokeMaterial, fillMaterial, strokeStyle);
73 73
74 world.addObject(oval); 74 world.addObject(oval);