aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/rectangle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/rectangle.js')
-rwxr-xr-xjs/lib/geom/rectangle.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 711245ae..b85433a0 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -507,7 +507,7 @@ exports.Rectangle = Object.create(GeomObj, {
507 } 507 }
508 }, 508 },
509 509
510 render: { 510 render: {
511 value: function() { 511 value: function() {
512 // get the world 512 // get the world
513 var world = this.getWorld(); 513 var world = this.getWorld();
@@ -538,7 +538,6 @@ exports.Rectangle = Object.create(GeomObj, {
538 if(this._fillColor.gradientMode) { 538 if(this._fillColor.gradientMode) {
539 if(this._fillColor.gradientMode === "radial") { 539 if(this._fillColor.gradientMode === "radial") {
540 var ww = w - 2*lw, hh = h - 2*lw; 540 var ww = w - 2*lw, hh = h - 2*lw;
541 //gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2-this._strokeWidth, h/2, Math.max(ww, hh)/2);
542 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(ww, hh)/2); 541 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(ww, hh)/2);
543 } else { 542 } else {
544 gradient = ctx.createLinearGradient(inset, h/2, w-inset, h/2); 543 gradient = ctx.createLinearGradient(inset, h/2, w-inset, h/2);
@@ -572,11 +571,10 @@ exports.Rectangle = Object.create(GeomObj, {
572 inset = Math.ceil( 0.5*lw ) - 0.5; 571 inset = Math.ceil( 0.5*lw ) - 0.5;
573 572
574 if(this._strokeColor.gradientMode) { 573 if(this._strokeColor.gradientMode) {
575 if(this._strokeColor.gradientMode === "radial") { 574 if(this._strokeColor.gradientMode === "radial")
576 gradient = ctx.createRadialGradient(w/2, h/2, Math.min(h, w)/2-inset, w/2, h/2, Math.max(h, w)/2); 575 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(h, w)/2);
577 } else { 576 else
578 gradient = ctx.createLinearGradient(0, h/2, w, h/2); 577 gradient = ctx.createLinearGradient(0, h/2, w, h/2);
579 }
580 colors = this._strokeColor.color; 578 colors = this._strokeColor.color;
581 579
582 len = colors.length; 580 len = colors.length;