|
|
@ -11,6 +11,7 @@ |
|
|
|
#include <v8.h> |
|
|
|
#include <node.h> |
|
|
|
#include <node_object_wrap.h> |
|
|
|
#include <node_version.h> |
|
|
|
#include <cairo.h> |
|
|
|
|
|
|
|
using namespace v8; |
|
|
@ -43,7 +44,13 @@ class Canvas: public node::ObjectWrap { |
|
|
|
static void SetHeight(Local<String> prop, Local<Value> val, const AccessorInfo &info); |
|
|
|
static Handle<Value> StreamPNGSync(const Arguments &args); |
|
|
|
static Local<Value> Error(cairo_status_t status); |
|
|
|
static int EIO_ToBuffer(eio_req *req); |
|
|
|
static |
|
|
|
#if NODE_VERSION_AT_LEAST(0, 5, 4) |
|
|
|
void |
|
|
|
#else |
|
|
|
int |
|
|
|
#endif |
|
|
|
EIO_ToBuffer(eio_req *req); |
|
|
|
static int EIO_AfterToBuffer(eio_req *req); |
|
|
|
inline cairo_surface_t *surface(){ return _surface; } |
|
|
|
inline uint8_t *data(){ return cairo_image_surface_get_data(_surface); } |
|
|
|