Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (25 sloc) 0.844 kb
#ifndef __NODE_MAPNIK_PALETTE_H__
#define __NODE_MAPNIK_PALETTE_H__
#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 {
public:
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_; }
private:
~Palette();
palette_ptr palette_;
};
#endif
Jump to Line
Something went wrong with that request. Please try again.