|
|
@ -165,7 +165,7 @@ Context2d.prototype.setTransform = function(){ |
|
|
|
*/ |
|
|
|
|
|
|
|
Context2d.prototype.__defineSetter__('fillStyle', function(val){ |
|
|
|
if ('CanvasGradient' == val.constructor.name) { |
|
|
|
if (~['CanvasGradient','CanvasPattern'].indexOf(val.constructor.name)) { |
|
|
|
this.lastFillStyle = val; |
|
|
|
this._setFillPattern(val); |
|
|
|
} else if ('string' == typeof val) { |
|
|
@ -191,7 +191,7 @@ Context2d.prototype.__defineGetter__('fillStyle', function(){ |
|
|
|
*/ |
|
|
|
|
|
|
|
Context2d.prototype.__defineSetter__('strokeStyle', function(val){ |
|
|
|
if ('CanvasGradient' == val.constructor.name) { |
|
|
|
if (~['CanvasGradient','CanvasPattern'].indexOf(val.constructor.name)) { |
|
|
|
this.lastStrokeStyle = val; |
|
|
|
this._setStrokePattern(val); |
|
|
|
} else if ('string' == typeof val) { |
|
|
|