Index: experimental/SkV8Example/Path2DBuilder.h |
diff --git a/experimental/SkV8Example/Path2D.h b/experimental/SkV8Example/Path2DBuilder.h |
similarity index 69% |
copy from experimental/SkV8Example/Path2D.h |
copy to experimental/SkV8Example/Path2DBuilder.h |
index 93c1299c61e29c42163205c18651945ba854e8b2..da9bddcb0637d957c7389ed443c3ee8203e3b36e 100644 |
--- a/experimental/SkV8Example/Path2D.h |
+++ b/experimental/SkV8Example/Path2DBuilder.h |
@@ -7,8 +7,8 @@ |
* |
*/ |
-#ifndef SkV8Example_Path2D_DEFINED |
-#define SkV8Example_Path2D_DEFINED |
+#ifndef SkV8Example_Path2DBuilder_DEFINED |
+#define SkV8Example_Path2DBuilder_DEFINED |
#include <v8.h> |
@@ -17,20 +17,20 @@ |
class Global; |
-class Path2D : SkNoncopyable { |
+class Path2DBuilder : SkNoncopyable { |
public: |
- Path2D() : fSkPath() {} |
- virtual ~Path2D() {} |
+ Path2DBuilder() : fSkPath() {} |
+ virtual ~Path2DBuilder() {} |
const SkPath& getSkPath() { return fSkPath; } |
- // The JS Path2D constuctor implementation. |
+ // The JS Path2DBuilder constuctor implementation. |
static void ConstructPath(const v8::FunctionCallbackInfo<v8::Value>& args); |
- // Add the Path2D JS constructor to the global context. |
+ // Add the Path2DBuilder JS constructor to the global context. |
static void AddToGlobal(Global* global); |
- // Path2D JS methods. |
+ // Path2DBuilder JS methods. |
static void ClosePath(const v8::FunctionCallbackInfo<v8::Value>& args); |
static void MoveTo(const v8::FunctionCallbackInfo<v8::Value>& args); |
static void LineTo(const v8::FunctionCallbackInfo<v8::Value>& args); |
@@ -41,10 +41,11 @@ public: |
static void Rect(const v8::FunctionCallbackInfo<v8::Value>& args); |
static void Oval(const v8::FunctionCallbackInfo<v8::Value>& args); |
static void ConicTo(const v8::FunctionCallbackInfo<v8::Value>& args); |
+ static void Finalize(const v8::FunctionCallbackInfo<v8::Value>& args); |
private: |
SkPath fSkPath; |
- static Path2D* Unwrap(const v8::FunctionCallbackInfo<v8::Value>& args); |
+ static Path2DBuilder* Unwrap(const v8::FunctionCallbackInfo<v8::Value>& args); |
static Global* gGlobal; |
}; |