diff options
author | Nivesh Rajbhandari | 2012-06-28 17:54:15 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-06-28 17:54:15 -0700 |
commit | e3eb68c3a0b911acd873ee6211931b8f4e620030 (patch) | |
tree | a0b1fa11fb6bca1c232adff0f52a19d71404984a /js/tools/OvalTool.js | |
parent | b4b54f6cc084b3f7483ebed1e15c1b4770949d58 (diff) | |
download | ninja-e3eb68c3a0b911acd873ee6211931b8f4e620030.tar.gz |
Fixed not being able to draw linear and radial gradients. Also fixed IKNINJA-1721 - File dirty marker does not show when modifying elements and IKNinja-1581 and IKNinja-1758 - Paint bucket fill bugs with lines and brush objects. Squashed commit of the following:
commit 7cad082c89911d34a99feeef8e91d22b89cae8f1
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 17:52:07 2012 -0700
Fix for not being able to draw linear and radial gradient materials.
I'm turning off pre-flight support of gradients for WebGL since it conflicts with the materials' color support.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit d0df8a2bff052d855bafb7885792b1dfff8eab7d
Merge: 2c67d26 b4b54f6
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 17:50:11 2012 -0700
Merge branch 'refs/heads/ninja-internal' into ToolFixes
commit 2c67d264851f0897fdca8ca887c1c82d0e434217
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 15:06:13 2012 -0700
IKNINJA-1721 - File dirty marker does not show when modifying elements.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit bb4b6a52eb75efb2f435cdb53f810ae3bc1f1fc3
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 11:15:34 2012 -0700
IKNinja-1581 and IKNinja-1758 - Paint bucket fill bugs with lines and brush objects.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-x | js/tools/OvalTool.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 33bf763d..e798d1a7 100755 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.js | |||
@@ -39,23 +39,24 @@ 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.options.stroke.webGlColor; | 42 | var strokeColor = this.options.stroke.webGlColor || [0,0,0,1]; |
43 | var fillColor = this.options.fill.webGlColor; | 43 | var fillColor = this.options.fill.webGlColor || [1,1,1,1]; |
44 | |||
45 | // for default stroke and fill/no materials | 44 | // for default stroke and fill/no materials |
46 | var strokeMaterial = null; | 45 | var strokeMaterial = null; |
47 | var fillMaterial = null; | 46 | var fillMaterial = null; |
47 | var fillM = null; | ||
48 | var strokeM = null; | ||
48 | 49 | ||
49 | if(this.options.use3D) | 50 | if(this.options.use3D) |
50 | { | 51 | { |
51 | var strokeM = this.options.strokeMaterial; | 52 | strokeM = this.options.strokeMaterial; |
52 | if(strokeM) | 53 | if(strokeM) |
53 | { | 54 | { |
54 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 55 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
55 | } | 56 | } |
56 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | 57 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; |
57 | 58 | ||
58 | var fillM = this.options.fillMaterial; | 59 | fillM = this.options.fillMaterial; |
59 | if(fillM) | 60 | if(fillM) |
60 | { | 61 | { |
61 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); | 62 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
@@ -95,7 +96,12 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
95 | } | 96 | } |
96 | 97 | ||
97 | // TODO - This needs to be moved into geom obj's init routine instead of here | 98 | // TODO - This needs to be moved into geom obj's init routine instead of here |
98 | this.setColor(this.options.stroke, this.options.fill, canvas, "ovalTool"); | 99 | if(!fillM) { |
100 | this.setColor(canvas, this.options.fill, true, "ovalTool"); | ||
101 | } | ||
102 | if(!strokeM) { | ||
103 | this.setColor(canvas, this.options.stroke, false, "ovalTool"); | ||
104 | } | ||
99 | 105 | ||
100 | if(canvas.elementModel.isShape) | 106 | if(canvas.elementModel.isShape) |
101 | { | 107 | { |