Permalink
Browse files

Added shape type constants

  • Loading branch information...
Alan Boudreault
Alan Boudreault committed Dec 16, 2013
1 parent e8063b9 commit 0bca0590793dd4bcc8e75cdfd882ca08059f2b4f
Showing with 9 additions and 0 deletions.
  1. +9 −0 mapscript/v8/shape.cpp
View
@@ -59,6 +59,15 @@ void Shape::Initialize(Handle<Object> target)
NODE_SET_PROTOTYPE_METHOD(c, "add", addLine);
NODE_SET_PROTOTYPE_METHOD(c, "setGeometry", setGeometry);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Point",MS_SHAPE_POINT);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Line",MS_SHAPE_LINE);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Polygon",MS_SHAPE_POLYGON);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Null",MS_SHAPE_NULL);
target->Set(String::NewSymbol("shapeObj"), c->GetFunction());
constructor.Reset(Isolate::GetCurrent(), c);

0 comments on commit 0bca059

Please sign in to comment.