From bee3774333296e72108aaba94ac588a8e1c80250 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Thu, 10 Jul 2014 10:52:55 +0200 Subject: [PATCH] export canvas.CanvasPixelArray instead of canvas.PixelArray which is undefined --- lib/canvas.js | 2 +- test/canvas.test.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/canvas.js b/lib/canvas.js index e238f34..5615521 100644 --- a/lib/canvas.js +++ b/lib/canvas.js @@ -13,7 +13,7 @@ var canvas = require('./bindings') , Canvas = canvas.Canvas , Image = canvas.Image , cairoVersion = canvas.cairoVersion - , PixelArray = canvas.PixelArray + , PixelArray = canvas.CanvasPixelArray , Context2d = require('./context2d') , PNGStream = require('./pngstream') , JPEGStream = require('./jpegstream') diff --git a/test/canvas.test.js b/test/canvas.test.js index af43cc7..9b3d247 100644 --- a/test/canvas.test.js +++ b/test/canvas.test.js @@ -76,6 +76,10 @@ module.exports = { } }, + 'test .PixelArray': function(){ + assert.equal(typeof Canvas.PixelArray, 'function'); + }, + 'test color serialization': function(){ var canvas = new Canvas(200, 200) , ctx = canvas.getContext('2d');