Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (25 sloc) 848 Bytes
#include <v8.h>
#include <node.h>
#include <node_object_wrap.h>
// boost
#include <boost/shared_ptr.hpp>
#include <mapnik/palette.hpp>
using namespace v8;
using namespace node;
typedef boost::shared_ptr<mapnik::rgba_palette> palette_ptr;
class Palette: public node::ObjectWrap {
static Persistent<FunctionTemplate> constructor;
explicit Palette(std::string const& palette, mapnik::rgba_palette::palette_type type);
static void Initialize(Handle<Object> target);
static Handle<Value> New(const Arguments &args);
static Handle<Value> ToString(const Arguments& args);
static Handle<Value> ToBuffer(const Arguments& args);
inline palette_ptr palette() { return palette_; }
palette_ptr palette_;
Something went wrong with that request. Please try again.