|
|
@ -150,7 +150,7 @@ Context2d.prototype.setTransform = function(){ |
|
|
|
*/ |
|
|
|
|
|
|
|
Context2d.prototype.__defineSetter__('fillStyle', function(val){ |
|
|
|
if (val instanceof CanvasGradient) { |
|
|
|
if ('CanvasGradient' == val.constructor.name) { |
|
|
|
this.lastFillStyle = val; |
|
|
|
this._setFillPattern(val); |
|
|
|
} else if ('string' == typeof val) { |
|
|
@ -176,7 +176,7 @@ Context2d.prototype.__defineGetter__('fillStyle', function(){ |
|
|
|
*/ |
|
|
|
|
|
|
|
Context2d.prototype.__defineSetter__('strokeStyle', function(val){ |
|
|
|
if (val instanceof CanvasGradient) { |
|
|
|
if ('CanvasGradient' == val.constructor.name) { |
|
|
|
this.lastStrokeStyle = val; |
|
|
|
this._setStrokePattern(val); |
|
|
|
} else if ('string' == typeof val) { |
|
|
@ -315,7 +315,7 @@ Context2d.prototype.getImageData = function(x, y, width, height){ |
|
|
|
*/ |
|
|
|
|
|
|
|
Context2d.prototype.createImageData = function(width, height){ |
|
|
|
if (width instanceof ImageData) { |
|
|
|
if ('ImageData' == width.constructor.name) { |
|
|
|
height = width.height; |
|
|
|
width = width.width; |
|
|
|
} |
|
|
|