aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/GLCircle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/RDGE/GLCircle.js')
-rwxr-xr-x[-rw-r--r--]js/helper-classes/RDGE/GLCircle.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/helper-classes/RDGE/GLCircle.js b/js/helper-classes/RDGE/GLCircle.js
index 942eb528..5b32547e 100644..100755
--- a/js/helper-classes/RDGE/GLCircle.js
+++ b/js/helper-classes/RDGE/GLCircle.js
@@ -133,6 +133,9 @@ function GLCircle()
133 if (!world) throw( "null world in buildBuffers" ); 133 if (!world) throw( "null world in buildBuffers" );
134 134
135 if (!world._useWebGL) return; 135 if (!world._useWebGL) return;
136
137 // make sure RDGE has the correct context
138 g_Engine.setContext( world.getCanvas().uuid );
136 139
137 // create the gl buffer 140 // create the gl buffer
138 var gl = world.getGLContext(); 141 var gl = world.getGLContext();
@@ -397,7 +400,10 @@ function GLCircle()
397 ctx.lineWidth = 0; 400 ctx.lineWidth = 0;
398 ctx.fillStyle = "#990000"; 401 ctx.fillStyle = "#990000";
399 if (this._fillColor) 402 if (this._fillColor)
400 ctx.fillStyle = MathUtils.colorToHex( this._fillColor ); 403 {
404 var c = "rgba(" + 255*this._fillColor[0] + "," + 255*this._fillColor[1] + "," + 255*this._fillColor[2] + "," + this._fillColor[3] + ")";
405 ctx.fillStyle = c;
406 }
401 407
402 // draw the fill 408 // draw the fill
403 ctx.beginPath(); 409 ctx.beginPath();
@@ -457,7 +463,10 @@ function GLCircle()
457 ctx.lineWidth = lineWidth; 463 ctx.lineWidth = lineWidth;
458 ctx.strokeStyle = "#0000ff"; 464 ctx.strokeStyle = "#0000ff";
459 if (this._strokeColor) 465 if (this._strokeColor)
460 ctx.strokeStyle = MathUtils.colorToHex( this._strokeColor ); 466 {
467 var c = "rgba(" + 255*this._strokeColor[0] + "," + 255*this._strokeColor[1] + "," + 255*this._strokeColor[2] + "," + this._strokeColor[3] + ")";
468 ctx.strokeStyle = c;
469 }
461 470
462 // draw the stroke 471 // draw the stroke
463 p = MathUtils.transformPoint( bezPts[0], mat ); 472 p = MathUtils.transformPoint( bezPts[0], mat );