aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom
diff options
context:
space:
mode:
authorPushkar Joshi2012-05-01 17:00:40 -0700
committerPushkar Joshi2012-05-01 17:00:40 -0700
commitb9262c831952e77135b79c2de7c455d5e7ff0589 (patch)
tree2ab33b47c67291b7e8505d36bf9eea3a94687575 /js/lib/geom
parent42b0fe45cded043f2c210f263a3eb2ba2dbd09c2 (diff)
downloadninja-b9262c831952e77135b79c2de7c455d5e7ff0589.tar.gz
undo some previous change that was halving the alpha value of the stroke
Diffstat (limited to 'js/lib/geom')
-rwxr-xr-xjs/lib/geom/brush-stroke.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/lib/geom/brush-stroke.js b/js/lib/geom/brush-stroke.js
index a1746d95..519e0433 100755
--- a/js/lib/geom/brush-stroke.js
+++ b/js/lib/geom/brush-stroke.js
@@ -665,6 +665,7 @@ var BrushStroke = function GLBrushStroke() {
665 if (distFromOpaqueRegion>0) { 665 if (distFromOpaqueRegion>0) {
666 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth; 666 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth;
667 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values 667 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values
668 alphaVal *= 0.5; //factor that accounts for lineWidth == 2
668 } 669 }
669 ctx.save(); 670 ctx.save();
670 if (t === (numTraces-1) || t === 0){ 671 if (t === (numTraces-1) || t === 0){
@@ -672,7 +673,6 @@ var BrushStroke = function GLBrushStroke() {
672 } else { 673 } else {
673 //todo figure out the correct formula for the line width 674 //todo figure out the correct formula for the line width
674 ctx.lineWidth=2; 675 ctx.lineWidth=2;
675 alphaVal *= 0.5; //factor that accounts for lineWidth == 2
676 } 676 }
677 ctx.strokeStyle="rgba("+parseInt(255*this._strokeColor[0])+","+parseInt(255*this._strokeColor[1])+","+parseInt(255*this._strokeColor[2])+","+alphaVal+")"; 677 ctx.strokeStyle="rgba("+parseInt(255*this._strokeColor[0])+","+parseInt(255*this._strokeColor[1])+","+parseInt(255*this._strokeColor[2])+","+alphaVal+")";
678 //linearly interpolate between the two stroke colors 678 //linearly interpolate between the two stroke colors