aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-12 20:59:05 -0700
committerValerio Virgillito2012-06-12 20:59:05 -0700
commitab517ff1061b9494ecc5178e5bc24f1872c9c067 (patch)
tree1c48ef5cc7ae9660ef0da20a6b1516be5ea488cb /js/lib/geom
parentadc7c64c862445580b3cb2b76a7f937c0a3f5715 (diff)
parent493485c1ebc4d4034e10b47c161035409e598fcf (diff)
downloadninja-ab517ff1061b9494ecc5178e5bc24f1872c9c067.tar.gz
Merge branch 'refs/heads/master' into montage-v10-integration
Conflicts: js/io/system/ninjalibrary.json Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/lib/geom')
-rwxr-xr-xjs/lib/geom/brush-stroke.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/lib/geom/brush-stroke.js b/js/lib/geom/brush-stroke.js
index d9c2ab53..0e0406dd 100755
--- a/js/lib/geom/brush-stroke.js
+++ b/js/lib/geom/brush-stroke.js
@@ -719,7 +719,10 @@ BrushStroke.prototype.drawToContext = function(ctx, drawStageWorldPts, stageWorl
719 var disp = [brushStamp[t][0], brushStamp[t][1]]; 719 var disp = [brushStamp[t][0], brushStamp[t][1]];
720 var alphaVal = 1.0; 720 var alphaVal = 1.0;
721 var distFromOpaqueRegion = Math.abs(t-halfNumTraces) - opaqueRegionHalfWidth; 721 var distFromOpaqueRegion = Math.abs(t-halfNumTraces) - opaqueRegionHalfWidth;
722 if (distFromOpaqueRegion>0) { 722 if (numTraces === 1){
723 distFromOpaqueRegion = 0;
724 }
725 else if (distFromOpaqueRegion>0) {
723 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth; 726 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth;
724 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values 727 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values
725 alphaVal *= 0.5; //factor that accounts for lineWidth == 2 728 alphaVal *= 0.5; //factor that accounts for lineWidth == 2