migrate to canvas 2.x api
This commit is contained in:
parent
1b84b2ed60
commit
f0e9df745c
@ -21,7 +21,7 @@ function NodeCanvasFactory() {}
|
||||
NodeCanvasFactory.prototype = {
|
||||
create: function NodeCanvasFactory_create(width, height) {
|
||||
assert(width > 0 && height > 0, 'Invalid canvas size');
|
||||
var canvas = new Canvas(width, height);
|
||||
var canvas = Canvas.createCanvas(width, height);
|
||||
var context = canvas.getContext('2d');
|
||||
return {
|
||||
canvas: canvas,
|
||||
|
Loading…
Reference in New Issue
Block a user