aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-07 11:52:41 -0800
committerNivesh Rajbhandari2012-03-07 11:52:41 -0800
commit5bef5c5f2f7ee45d4c619c65ab8e9307c30420b5 (patch)
tree3d7db1f8b8e0f5eb4e4f79bfac9493c9ec3075a8
parentfc567223aded95c35982b1d1239f6d28a957a199 (diff)
downloadninja-5bef5c5f2f7ee45d4c619c65ab8e9307c30420b5.tar.gz
Change linear gradient to go from left to right instead of top-left to bottom-right.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
-rwxr-xr-xjs/lib/geom/rectangle.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 50271a13..d01d5b28 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -477,7 +477,7 @@ var Rectangle = function GLRectangle() {
477 if(this._fillColor.gradientMode === "radial") { 477 if(this._fillColor.gradientMode === "radial") {
478 gradient = ctx.createRadialGradient(w/2, h/2, h/2-inset, w/2, h/2, h-2*inset); 478 gradient = ctx.createRadialGradient(w/2, h/2, h/2-inset, w/2, h/2, h-2*inset);
479 } else { 479 } else {
480 gradient = ctx.createLinearGradient(inset, inset, w-inset, h-inset); 480 gradient = ctx.createLinearGradient(inset, h/2, w-2*inset, h/2);
481 } 481 }
482 colors = this._fillColor.color; 482 colors = this._fillColor.color;
483 483
@@ -511,7 +511,7 @@ var Rectangle = function GLRectangle() {
511 if(this._strokeColor.gradientMode === "radial") { 511 if(this._strokeColor.gradientMode === "radial") {
512 gradient = ctx.createRadialGradient(w/2, h/2, h/2, w/2, h/2, h); 512 gradient = ctx.createRadialGradient(w/2, h/2, h/2, w/2, h/2, h);
513 } else { 513 } else {
514 gradient = ctx.createLinearGradient(0, 0, w, h); 514 gradient = ctx.createLinearGradient(0, h/2, w, h/2);
515 } 515 }
516 colors = this._strokeColor.color; 516 colors = this._strokeColor.color;
517 517