|
|
@ -119,6 +119,16 @@ Canvas.prototype.getContext = function(contextId){ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
CanvasGradient.prototype.addColorStop = function(offset, color){ |
|
|
|
var rgba = exports.parseColor(color) || [0,0,0,1]; |
|
|
|
this.addColorStopRGBA( |
|
|
|
offset |
|
|
|
, rgba[0] |
|
|
|
, rgba[1] |
|
|
|
, rgba[2] |
|
|
|
, rgba[3]); |
|
|
|
}; |
|
|
|
|
|
|
|
Context2d.prototype.createLinearGradient = function(x0, y0, x1, y1){ |
|
|
|
return new CanvasGradient(x0, y0, x1, y1); |
|
|
|
}; |
|
|
|