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:
parent
1b84b2ed60
commit
f0e9df745c
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue