@ -20,10 +20,10 @@ PixelArray.prototype.inspect = function(){
var buf = '[PixelArray ';
for (var i = 0, len = this.length; i < len; i += 4) {
buf += '\n ' + i + ': rgba('
+ this[i + 0] + ','
+ this[i + 1] + ','
+ this[i + 2] + ','
+ this[i + 3] + ','
+ this[i] + ')';
+ this[i + 3] + ')';
}
return buf + '\n]';
};
@ -82,6 +82,7 @@ PixelArray::PixelArray(Canvas *canvas, int src_x, int src_y, int width, int heig
_width(width), _height(height) {
_data = (uint8_t *) malloc(length());
memset(_data, 0, length());
_data = cairo_image_surface_get_data(canvas->surface());
PixelArray::PixelArray(int width, int height):