diff options
author | Pushkar Joshi | 2012-03-01 15:29:17 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-03-01 15:29:17 -0800 |
commit | 0b7f2f54738d2c1ea480b9bac7d3a750b1ef4df6 (patch) | |
tree | 16309dcc8e50851bc75ab4ecd5a7c9fac85172ed /js/tools | |
parent | 271a8f2b29d87d12c81d03e3f1e2c05b816a138d (diff) | |
download | ninja-0b7f2f54738d2c1ea480b9bac7d3a750b1ef4df6.tar.gz |
first attempt at rendering the brush stroke as a collection of polylines (number of polylines equals the stroke width)
Diffstat (limited to 'js/tools')
-rw-r--r-- | js/tools/BrushTool.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js index fec89eb2..dc9e022e 100644 --- a/js/tools/BrushTool.js +++ b/js/tools/BrushTool.js | |||
@@ -72,7 +72,7 @@ exports.BrushTool = Montage.create(ShapeTool, { | |||
72 | this._selectedBrushStroke.addPoint(currMousePos); | 72 | this._selectedBrushStroke.addPoint(currMousePos); |
73 | 73 | ||
74 | //TODO get these values from the options | 74 | //TODO get these values from the options |
75 | this._selectedBrushStroke.setStrokeWidth(20); | 75 | this._selectedBrushStroke.setStrokeWidth(10); |
76 | } | 76 | } |
77 | NJevent("enableStageMove");//stageManagerModule.stageManager.enableMouseMove(); | 77 | NJevent("enableStageMove");//stageManagerModule.stageManager.enableMouseMove(); |
78 | } //value: function (event) { | 78 | } //value: function (event) { |
@@ -112,7 +112,7 @@ exports.BrushTool = Montage.create(ShapeTool, { | |||
112 | 112 | ||
113 | if (this._isDrawing) { | 113 | if (this._isDrawing) { |
114 | var currMousePos = this._getUnsnappedPosition(event.pageX, event.pageY); | 114 | var currMousePos = this._getUnsnappedPosition(event.pageX, event.pageY); |
115 | if (this._selectedBrushStroke && this._selectedBrushStroke.getNumPoints()<100){ | 115 | if (this._selectedBrushStroke && this._selectedBrushStroke.getNumPoints()<1000){ |
116 | this._selectedBrushStroke.addPoint(currMousePos); | 116 | this._selectedBrushStroke.addPoint(currMousePos); |
117 | } | 117 | } |
118 | this.ShowCurrentBrushStrokeOnStage(); | 118 | this.ShowCurrentBrushStrokeOnStage(); |