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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void addPath(Path2D* path, SVGMatrixTearOff* transform) | 60 void addPath(Path2D* path, SVGMatrixTearOff* transform) |
61 { | 61 { |
62 Path src = path->path(); | 62 Path src = path->path(); |
63 m_path.addPath(src, transform ? transform->value() : AffineTransform(1,
0, 0, 1, 0, 0)); | 63 m_path.addPath(src, transform ? transform->value() : AffineTransform(1,
0, 0, 1, 0, 0)); |
64 } | 64 } |
65 | 65 |
66 virtual ~Path2D() { } | 66 virtual ~Path2D() { } |
67 void trace(Visitor*) { } | 67 void trace(Visitor*) { } |
68 | 68 |
69 private: | 69 private: |
70 Path2D() : CanvasPathMethods() | 70 Path2D() : CanvasPathMethods() { } |
71 { | |
72 ScriptWrappable::init(this); | |
73 } | |
74 | 71 |
75 Path2D(const Path& path) | 72 Path2D(const Path& path) |
76 : CanvasPathMethods(path) | 73 : CanvasPathMethods(path) { } |
77 { | |
78 ScriptWrappable::init(this); | |
79 } | |
80 | 74 |
81 Path2D(Path2D* path) | 75 Path2D(Path2D* path) |
82 : CanvasPathMethods(path->path()) | 76 : CanvasPathMethods(path->path()) { } |
83 { | |
84 ScriptWrappable::init(this); | |
85 } | |
86 | 77 |
87 Path2D(const String& pathData) | 78 Path2D(const String& pathData) |
88 : CanvasPathMethods() | 79 : CanvasPathMethods() |
89 { | 80 { |
90 ScriptWrappable::init(this); | |
91 buildPathFromString(pathData, m_path); | 81 buildPathFromString(pathData, m_path); |
92 } | 82 } |
93 }; | 83 }; |
94 | 84 |
95 } // namespace blink | 85 } // namespace blink |
96 | 86 |
97 #endif // Path2D_h | 87 #endif // Path2D_h |
OLD | NEW |