aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/brush-stroke.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/brush-stroke.js')
-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