diff --git a/lib/canvas.js b/lib/canvas.js index d013d2a..86b7843 100644 --- a/lib/canvas.js +++ b/lib/canvas.js @@ -119,11 +119,14 @@ Canvas.prototype.getContext = function(contextId){ } }; +Context2d.prototype.createLinearGradient = function(x0, y0, x1, y1){ + return new CanvasGradient(x0, y0, x1, y1); +}; + Context2d.prototype.createRadialGradient = function(x0, y0, r0, x1, y1, r1){ return new CanvasGradient(x0, y0, r0, x1, y1, r1); }; - /** * Set the fill style with the given css color string. *