Browse Source

Merge pull request #448 from Gottox/master

export canvas.CanvasPixelArray instead of canvas.PixelArray which is undefined
v1.x
Nathan Rajlich 11 years ago
parent
commit
e4bd4c6496
  1. 2
      lib/canvas.js
  2. 4
      test/canvas.test.js

2
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')

4
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');

Loading…
Cancel
Save