1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

migrate to canvas 2.x api

This commit is contained in:
Mohammed Essehemy 2019-01-02 01:10:07 +02:00
parent 1b84b2ed60
commit f0e9df745c
No known key found for this signature in database
GPG key ID: 2BE9817896EB585A

View file

@ -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,