Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (35 sloc) 1.298 kb
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
1 #ifndef __NODE_MAPNIK_GRID_VIEW_H__
2 #define __NODE_MAPNIK_GRID_VIEW_H__
3
4 #include <v8.h>
5 #include <node.h>
6 #include <node_object_wrap.h>
7 #include <mapnik/grid/grid_view.hpp>
8 #include <mapnik/grid/grid.hpp>
9 #include <boost/shared_ptr.hpp>
10
f06ecd0 @springmeyer reference count Grid objects in use by GridView objects to avoid possibl...
springmeyer authored
11 #include "mapnik_grid.hpp"
12
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
13 using namespace v8;
14 using namespace node;
15
16 typedef boost::shared_ptr<mapnik::grid_view> grid_view_ptr;
17
18 class GridView: public node::ObjectWrap {
3a02935 @springmeyer cpp coding style cleanups
springmeyer authored
19 public:
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
20 static Persistent<FunctionTemplate> constructor;
21 static void Initialize(Handle<Object> target);
22 static Handle<Value> New(const Arguments &args);
f06ecd0 @springmeyer reference count Grid objects in use by GridView objects to avoid possibl...
springmeyer authored
23 static Handle<Value> New(Grid * JSGrid,
3a02935 @springmeyer cpp coding style cleanups
springmeyer authored
24 unsigned x,unsigned y, unsigned w, unsigned h);
0f1386a @springmeyer move grid rendering to true async - closes #83
springmeyer authored
25
cf24193 convert grid encoding to async. the old interface is still available at ...
Konstantin Käfer authored
26 static Handle<Value> encodeSync(const Arguments &args);
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
27 static Handle<Value> encode(const Arguments &args);
0f1386a @springmeyer move grid rendering to true async - closes #83
springmeyer authored
28 static void EIO_Encode(uv_work_t* req);
29 static void EIO_AfterEncode(uv_work_t* req);
30
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
31 static Handle<Value> width(const Arguments &args);
32 static Handle<Value> height(const Arguments &args);
0345b66 @springmeyer add isSolid/getPixel implementations for mapnik.GridView - closes #82
springmeyer authored
33 static Handle<Value> isSolid(const Arguments &args);
34 static Handle<Value> getPixel(const Arguments &args);
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
35
f06ecd0 @springmeyer reference count Grid objects in use by GridView objects to avoid possibl...
springmeyer authored
36 GridView(Grid * JSGrid);
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
37 inline grid_view_ptr get() { return this_; }
38
3a02935 @springmeyer cpp coding style cleanups
springmeyer authored
39 private:
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
40 ~GridView();
41 grid_view_ptr this_;
f06ecd0 @springmeyer reference count Grid objects in use by GridView objects to avoid possibl...
springmeyer authored
42 Grid * JSGrid_;
a6d065c @springmeyer expose image_view and grid_view
springmeyer authored
43 };
44
45 #endif
Something went wrong with that request. Please try again.