From e7aa17a9b472640355e95c54841399f6203050d4 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Tue, 7 Feb 2012 07:20:28 -0800 Subject: don't use colorToHex function because it only works for 3D color (needs a fix to colorToHex) --- js/helper-classes/RDGE/GLSubpath.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/helper-classes/RDGE') diff --git a/js/helper-classes/RDGE/GLSubpath.js b/js/helper-classes/RDGE/GLSubpath.js index fd2f3560..62323b6d 100644 --- a/js/helper-classes/RDGE/GLSubpath.js +++ b/js/helper-classes/RDGE/GLSubpath.js @@ -136,8 +136,11 @@ function GLSubpath() { if (this._strokeColor) ctx.strokeStyle = MathUtils.colorToHex( this._strokeColor ); ctx.fillStyle = "white"; - if (this._fillColor) - ctx.fillStyle = MathUtils.colorToHex( this._fillColor ); + if (this._fillColor){ + //ctx.fillStyle = MathUtils.colorToHex( this._fillColor ); + var fillColorStr = "rgba("+parseInt(255*this._fillColor[0])+","+parseInt(255*this._fillColor[1])+","+parseInt(255*this._fillColor[2])+","+this._fillColor[3]+")"; + ctx.fillStyle = fillColorStr; + } var lineCap = ['butt','round','square']; ctx.lineCap = lineCap[1]; ctx.beginPath(); -- cgit v1.2.3