Browse Source

Stubbed out Canvas::ToBuffer()

v1.x
Tj Holowaychuk 14 years ago
parent
commit
2955ae7bfa
  1. 8
      src/Canvas.cc
  2. 1
      src/Canvas.h

8
src/Canvas.cc

@ -33,6 +33,7 @@ Canvas::Initialize(Handle<Object> target) {
t->SetClassName(String::NewSymbol("Canvas")); t->SetClassName(String::NewSymbol("Canvas"));
Local<ObjectTemplate> proto = t->PrototypeTemplate(); Local<ObjectTemplate> proto = t->PrototypeTemplate();
NODE_SET_PROTOTYPE_METHOD(t, "toBuffer", ToBuffer);
NODE_SET_PROTOTYPE_METHOD(t, "streamPNGSync", StreamPNGSync); NODE_SET_PROTOTYPE_METHOD(t, "streamPNGSync", StreamPNGSync);
proto->SetAccessor(String::NewSymbol("width"), GetWidth, SetWidth); proto->SetAccessor(String::NewSymbol("width"), GetWidth, SetWidth);
proto->SetAccessor(String::NewSymbol("height"), GetHeight, SetHeight); proto->SetAccessor(String::NewSymbol("height"), GetHeight, SetHeight);
@ -102,6 +103,13 @@ Canvas::SetHeight(Local<String> prop, Local<Value> val, const AccessorInfo &info
} }
} }
Handle<Value>
Canvas::ToBuffer(const Arguments &args) {
HandleScope scope;
return Undefined();
}
/* /*
* Canvas::StreamPNG callback. * Canvas::StreamPNG callback.
*/ */

1
src/Canvas.h

@ -52,6 +52,7 @@ class Canvas: public node::ObjectWrap {
int height; int height;
static void Initialize(Handle<Object> target); static void Initialize(Handle<Object> target);
static Handle<Value> New(const Arguments &args); static Handle<Value> New(const Arguments &args);
static Handle<Value> ToBuffer(const Arguments &args);
static Handle<Value> GetWidth(Local<String> prop, const AccessorInfo &info); static Handle<Value> GetWidth(Local<String> prop, const AccessorInfo &info);
static Handle<Value> GetHeight(Local<String> prop, const AccessorInfo &info); static Handle<Value> GetHeight(Local<String> prop, const AccessorInfo &info);
static void SetWidth(Local<String> prop, Local<Value> val, const AccessorInfo &info); static void SetWidth(Local<String> prop, Local<Value> val, const AccessorInfo &info);

Loading…
Cancel
Save