diff options
author | Jonathan Duran | 2012-06-29 15:16:11 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-29 15:16:11 -0700 |
commit | 5496f0060c5f43e7951a110241a18b9e631761bb (patch) | |
tree | bd1c8f20eb5b6ae0e24fcae28f16eb13cb969747 /js/tools/PenTool.js | |
parent | 3aa1242147264351b7d827fa25ecb5dc42bc2fb0 (diff) | |
parent | ec69c8761f798eaf39c4a154997f8bc54b7e47f4 (diff) | |
download | ninja-5496f0060c5f43e7951a110241a18b9e631761bb.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-x | js/tools/PenTool.js | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 2cffb44d..1097f28c 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js | |||
@@ -338,22 +338,28 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
338 | } | 338 | } |
339 | this._selectedSubpath.setStrokeWidth(strokeSize); | 339 | this._selectedSubpath.setStrokeWidth(strokeSize); |
340 | 340 | ||
341 | var colorArray=[]; | 341 | var colorObj; |
342 | var color = this.options.stroke.color; | 342 | var stroke = this.options.stroke; |
343 | if (color){ | 343 | var color = stroke.color; |
344 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; | 344 | if(stroke.colorMode === "gradient") { |
345 | }else { | 345 | colorObj = {gradientMode:stroke.color.gradientMode, color:stroke.color.stops}; |
346 | colorArray = [1,1,1,0]; | 346 | } else if (color) { |
347 | colorObj = [color.r/255, color.g/255, color.b/255, color.a]; | ||
348 | } else { | ||
349 | colorObj = [1,1,1,0]; | ||
347 | } | 350 | } |
348 | this._selectedSubpath.setStrokeColor(colorArray); | 351 | this._selectedSubpath.setStrokeColor(colorObj); |
349 | 352 | ||
350 | color = this.options.fill.color; | 353 | var fill = this.options.fill; |
351 | if (color){ | 354 | color = fill.color; |
352 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; | 355 | if(fill.colorMode === "gradient") { |
356 | colorObj = {gradientMode:fill.color.gradientMode, color:fill.color.stops}; | ||
357 | } else if (color) { | ||
358 | colorObj = [color.r/255, color.g/255, color.b/255, color.a]; | ||
353 | } else { | 359 | } else { |
354 | colorArray = [1,1,1,0]; | 360 | colorObj = [1,1,1,0]; |
355 | } | 361 | } |
356 | this._selectedSubpath.setFillColor(colorArray); | 362 | this._selectedSubpath.setFillColor(colorObj); |
357 | } //if the selectedSubpath was null and needed to be constructed | 363 | } //if the selectedSubpath was null and needed to be constructed |
358 | 364 | ||
359 | //build the current mouse position in stage world space in case we don't already have a canvas | 365 | //build the current mouse position in stage world space in case we don't already have a canvas |