diff options
author | Valerio Virgillito | 2012-04-26 11:13:03 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-26 11:13:03 -0700 |
commit | 575c8a8fb6b32d01d48d94b55a0d469ad4ddebc8 (patch) | |
tree | ff4972ad9b2e26decd5a5cf971c1335cb6eba1a1 /js/lib/geom/circle.js | |
parent | bcc8f8616f5ad4bf310928da6cbc01da12f6e468 (diff) | |
parent | 5e637fc2af6aa86e274d1932f69b61d56360ad27 (diff) | |
download | ninja-575c8a8fb6b32d01d48d94b55a0d469ad4ddebc8.tar.gz |
Merge pull request #177 from mqg734/WebGLMaterials
Fixed some rectangle radius bugs in canvas 2d mode. Also changed canvas 2d gradients to match what the browser renders for a div's background.
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-x | js/lib/geom/circle.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js index 1073c2db..218dcfa6 100755 --- a/js/lib/geom/circle.js +++ b/js/lib/geom/circle.js | |||
@@ -457,9 +457,9 @@ var Circle = function GLCircle() { | |||
457 | if(this._fillColor.gradientMode) { | 457 | if(this._fillColor.gradientMode) { |
458 | if(this._fillColor.gradientMode === "radial") { | 458 | if(this._fillColor.gradientMode === "radial") { |
459 | gradient = ctx.createRadialGradient(xCtr, yCtr, 0, | 459 | gradient = ctx.createRadialGradient(xCtr, yCtr, 0, |
460 | xCtr, yCtr, Math.max(yScale, xScale)); | 460 | xCtr, yCtr, Math.max(this._width, this._height)/2); |
461 | } else { | 461 | } else { |
462 | gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2); | 462 | gradient = ctx.createLinearGradient(lineWidth/2, this._height/2, this._width-lineWidth, this._height/2); |
463 | } | 463 | } |
464 | colors = this._fillColor.color; | 464 | colors = this._fillColor.color; |
465 | 465 | ||