Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: experimental/SkV8Example/Path.h

Issue 121303004: Fleshed out a lot of the Path interfac (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review feedback Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 *
8 */
9
10 #ifndef SkV8Example_Path_DEFINED
11 #define SkV8Example_Path_DEFINED
12
13 #include <v8.h>
14
15 using namespace v8;
tfarina 2014/01/06 15:59:46 this polutes the global namespace. I know this is
jcgregorio 2014/01/06 16:32:48 Done.
16
17 #include "SkPath.h"
18 #include "SkTypes.h"
19
20 class Global;
21
22 class Path : SkNoncopyable {
23 public:
24 Path() : fSkPath() {}
25 virtual ~Path() {}
26
27 const SkPath& getSkPath() { return fSkPath; }
28
29 // The JS Path constuctor implementation.
30 static void ConstructPath(const v8::FunctionCallbackInfo<Value>& args);
31
32 // Add the Path JS constructor to the global context.
33 static void AddToGlobal(Global* global);
34
35 // Path JS methods.
36 static void ClosePath(const v8::FunctionCallbackInfo<Value>& args);
37 static void MoveTo(const v8::FunctionCallbackInfo<Value>& args);
38 static void LineTo(const v8::FunctionCallbackInfo<Value>& args);
39 static void QuadraticCurveTo(const v8::FunctionCallbackInfo<Value>& args);
40 static void BezierCurveTo(const v8::FunctionCallbackInfo<Value>& args);
41 static void Arc(const v8::FunctionCallbackInfo<Value>& args);
42 static void Rect(const v8::FunctionCallbackInfo<Value>& args);
43 private:
44 SkPath fSkPath;
45
46 static Path* Unwrap(const v8::FunctionCallbackInfo<Value>& args);
47
48 static Global* gGlobal;
49 };
50
51 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698