hey guys, I cant seem to find any good docs for this. Basically my
issue is that I need to either invoke PixelArray::New() with Arguments
or do what I am currently doing below, and then have a "data" getter
that wrap. I would imagine it would be better to utilize the v8 api
for this instead of wrapping each time, I dont know the api very well
though yet so any pointers would be great!

ObjectWrap is a nodejs util, open to suggestions on that as well.

ImageData::ImageData(Canvas *canvas, int x, int y, int width, int
height):
  _x(x), _y(y), _width(width), _height(height), _canvas(canvas) {
  // should use PixelArray::New() here with an Arguments object
  data = new PixelArray(canvas, x, y, width, height);
}

Handle<Value>
ImageData::GetData(Local<String> prop, const AccessorInfo &info) {
  ImageData *imageData = ObjectWrap::Unwrap<ImageData>(info.This());
  PixelArray *data = imageData->getData();
  return Undefined();
}

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to