From 877cb0294fa9a91b6926239d476eac2e6b1c6506 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Wed, 13 Jun 2012 11:49:30 -0700 Subject: correct path resizing in case of stroke width other than 1 --- js/lib/geom/sub-path.js | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'js') diff --git a/js/lib/geom/sub-path.js b/js/lib/geom/sub-path.js index f765b715..ba277197 100755 --- a/js/lib/geom/sub-path.js +++ b/js/lib/geom/sub-path.js @@ -54,7 +54,7 @@ var GLSubpath = function GLSubpath() { //drawing context this._world = null; this._canvas = null; //todo this might be unnecessary (but faster) since we can get it from the world - + //tool that owns this subpath this._drawingTool = null; @@ -207,24 +207,25 @@ GLSubpath.prototype.geomType = function () { GLSubpath.prototype.setWidth = function (newW) { var strokeWidth = this._strokeWidth; var halfStrokeWidth = strokeWidth*0.5; - if (newW<1) { - newW=1; //clamp minimum width to 1 + var minWidth = 1+strokeWidth; + if (newW