aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/BrushTool.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index 90010cdf..93020318 100644
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -204,20 +204,10 @@ exports.BrushTool = Montage.create(ShapeTool, {
204 204
205 var horizontalOffset = this.application.ninja.stage.userContentLeft; 205 var horizontalOffset = this.application.ninja.stage.userContentLeft;
206 var verticalOffset = this.application.ninja.stage.userContentTop; 206 var verticalOffset = this.application.ninja.stage.userContentTop;
207 var origX = -horizontalOffset;
208 var origY = -verticalOffset;
209 this._selectedBrushStroke.drawToContext(ctx, origX, origY);
207 210
208 var numPoints = this._selectedBrushStroke.getNumPoints();
209 ctx.lineWidth = 1;
210 ctx.strokeStyle = "black";
211 ctx.beginPath();
212 var pt = this._selectedBrushStroke.getPoint(0);
213 ctx.moveTo(pt[0]+ horizontalOffset,pt[1]+ verticalOffset);
214 for (var i = 1; i < numPoints; i++) {
215 pt = this._selectedBrushStroke.getPoint(i);
216 var x = pt[0]+ horizontalOffset;
217 var y = pt[1]+ verticalOffset;
218 ctx.lineTo(x,y);
219 }
220 ctx.stroke();
221 ctx.restore(); 211 ctx.restore();
222 212
223 } 213 }