OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 10 matching lines...) Expand all Loading... |
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
23 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 23 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
24 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
25 * SUCH DAMAGE. | 25 * SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #ifndef SKY_ENGINE_CORE_HTML_CANVAS_PATH2D_H_ | 28 #ifndef SKY_ENGINE_CORE_HTML_CANVAS_PATH2D_H_ |
29 #define SKY_ENGINE_CORE_HTML_CANVAS_PATH2D_H_ | 29 #define SKY_ENGINE_CORE_HTML_CANVAS_PATH2D_H_ |
30 | 30 |
31 #include "sky/engine/bindings/core/v8/ScriptWrappable.h" | 31 #include "sky/engine/tonic/dart_wrappable.h" |
32 #include "sky/engine/core/html/canvas/CanvasPathMethods.h" | 32 #include "sky/engine/core/html/canvas/CanvasPathMethods.h" |
33 #include "sky/engine/platform/heap/Handle.h" | 33 #include "sky/engine/platform/heap/Handle.h" |
34 #include "sky/engine/platform/transforms/AffineTransform.h" | 34 #include "sky/engine/platform/transforms/AffineTransform.h" |
35 #include "sky/engine/wtf/PassRefPtr.h" | 35 #include "sky/engine/wtf/PassRefPtr.h" |
36 #include "sky/engine/wtf/RefCounted.h" | 36 #include "sky/engine/wtf/RefCounted.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class Path2D final : public RefCounted<Path2D>, public CanvasPathMethods, public
ScriptWrappable { | 40 class Path2D final : public RefCounted<Path2D>, public CanvasPathMethods, public
DartWrappable { |
41 DEFINE_WRAPPERTYPEINFO(); | 41 DEFINE_WRAPPERTYPEINFO(); |
42 WTF_MAKE_FAST_ALLOCATED; | 42 WTF_MAKE_FAST_ALLOCATED; |
43 WTF_MAKE_NONCOPYABLE(Path2D); | 43 WTF_MAKE_NONCOPYABLE(Path2D); |
44 public: | 44 public: |
45 static PassRefPtr<Path2D> create() { return adoptRef(new Path2D); } | 45 static PassRefPtr<Path2D> create() { return adoptRef(new Path2D); } |
46 static PassRefPtr<Path2D> create(Path2D* path) { return adoptRef(new Path2D(
path)); } | 46 static PassRefPtr<Path2D> create(Path2D* path) { return adoptRef(new Path2D(
path)); } |
47 | 47 |
48 static PassRefPtr<Path2D> create(const Path& path) { return adoptRef(new Pat
h2D(path)); } | 48 static PassRefPtr<Path2D> create(const Path& path) { return adoptRef(new Pat
h2D(path)); } |
49 | 49 |
50 const Path& path() const { return m_path; } | 50 const Path& path() const { return m_path; } |
(...skipping 17 matching lines...) Expand all Loading... |
68 | 68 |
69 Path2D(Path2D* path) | 69 Path2D(Path2D* path) |
70 : CanvasPathMethods(path->path()) | 70 : CanvasPathMethods(path->path()) |
71 { | 71 { |
72 } | 72 } |
73 }; | 73 }; |
74 | 74 |
75 } // namespace blink | 75 } // namespace blink |
76 | 76 |
77 #endif // SKY_ENGINE_CORE_HTML_CANVAS_PATH2D_H_ | 77 #endif // SKY_ENGINE_CORE_HTML_CANVAS_PATH2D_H_ |
OLD | NEW |