// // canvas.h // // Copyright (c) 2010 LearnBoost // #ifndef __NODE_CANVAS_H__ #define __NODE_CANVAS_H__ #include #include #include #include using namespace v8; class Canvas: public node::ObjectWrap { public: static void Initialize(Handle target); static Handle New(const Arguments &args); static Handle SavePNG(const Arguments &args); inline cairo_surface_t *getSurface(){ return _surface; } Canvas(int width, int height); private: ~Canvas(); cairo_surface_t *_surface; }; #endif