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/RectTool.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/RectTool.js')
-rwxr-xr-x | js/tools/RectTool.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index df049395..6f0e65c7 100755 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -59,22 +59,24 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
59 | var blRadius = ShapesController.GetValueInPixels(this.options.BLRadiusControl.value, this.options.BLRadiusControl.units, h); | 59 | var blRadius = ShapesController.GetValueInPixels(this.options.BLRadiusControl.value, this.options.BLRadiusControl.units, h); |
60 | var brRadius = ShapesController.GetValueInPixels(this.options.BRRadiusControl.value, this.options.BRRadiusControl.units, h); | 60 | var brRadius = ShapesController.GetValueInPixels(this.options.BRRadiusControl.value, this.options.BRRadiusControl.units, h); |
61 | 61 | ||
62 | var strokeColor = this.options.stroke.webGlColor; | 62 | var strokeColor = this.options.stroke.webGlColor || [0,0,0,1]; |
63 | var fillColor = this.options.fill.webGlColor; | 63 | var fillColor = this.options.fill.webGlColor || [1,1,1,1]; |
64 | // for default stroke and fill/no materials | 64 | // for default stroke and fill/no materials |
65 | var strokeMaterial = null; | 65 | var strokeMaterial = null; |
66 | var fillMaterial = null; | 66 | var fillMaterial = null; |
67 | var fillM = null; | ||
68 | var strokeM = null; | ||
67 | 69 | ||
68 | if(this.options.use3D) | 70 | if(this.options.use3D) |
69 | { | 71 | { |
70 | var strokeM = this.options.strokeMaterial; | 72 | strokeM = this.options.strokeMaterial; |
71 | if(strokeM) | 73 | if(strokeM) |
72 | { | 74 | { |
73 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 75 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
74 | } | 76 | } |
75 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | 77 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; |
76 | 78 | ||
77 | var fillM = this.options.fillMaterial; | 79 | fillM = this.options.fillMaterial; |
78 | if(fillM) | 80 | if(fillM) |
79 | { | 81 | { |
80 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); | 82 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
@@ -118,14 +120,16 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
118 | } | 120 | } |
119 | 121 | ||
120 | // TODO - This needs to be moved into geom obj's init routine instead of here | 122 | // TODO - This needs to be moved into geom obj's init routine instead of here |
121 | this.setColor(this.options.stroke, this.options.fill, canvas, "rectTool"); | 123 | if(!fillM) { |
122 | 124 | this.setColor(canvas, this.options.fill, true, "rectTool"); | |
125 | } | ||
126 | if(!strokeM) { | ||
127 | this.setColor(canvas, this.options.stroke, false, "rectTool"); | ||
128 | } | ||
123 | if(canvas.elementModel.isShape) | 129 | if(canvas.elementModel.isShape) |
124 | { | 130 | { |
125 | this.application.ninja.selectionController.selectElement(canvas); | 131 | this.application.ninja.selectionController.selectElement(canvas); |
126 | } | 132 | } |
127 | |||
128 | |||
129 | } | 133 | } |
130 | } | 134 | } |
131 | }); \ No newline at end of file | 135 | }); \ No newline at end of file |