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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 static Path2D* create(const String& pathData) { return new Path2D(pathData); } | 48 static Path2D* create(const String& pathData) { return new Path2D(pathData); } |
49 static Path2D* create(Path2D* path) { return new Path2D(path); } | 49 static Path2D* create(Path2D* path) { return new Path2D(path); } |
50 static Path2D* create(const Path& path) { return new Path2D(path); } | 50 static Path2D* create(const Path& path) { return new Path2D(path); } |
51 | 51 |
52 const Path& path() const { return m_path; } | 52 const Path& path() const { return m_path; } |
53 | 53 |
54 void addPath(Path2D* path) { addPath(path, 0); } | 54 void addPath(Path2D* path) { addPath(path, 0); } |
55 | 55 |
56 void addPath(Path2D* path, SVGMatrixTearOff* transform) { | 56 void addPath(Path2D* path, SVGMatrixTearOff* transform) { |
57 Path src = path->path(); | 57 Path src = path->path(); |
58 m_path.addPath(src, transform ? transform->value() | 58 m_path.addPath( |
59 : AffineTransform(1, 0, 0, 1, 0, 0)); | 59 src, |
| 60 transform ? transform->value() : AffineTransform(1, 0, 0, 1, 0, 0)); |
60 } | 61 } |
61 | 62 |
62 ~Path2D() override {} | 63 ~Path2D() override {} |
63 DEFINE_INLINE_TRACE() {} | 64 DEFINE_INLINE_TRACE() {} |
64 | 65 |
65 private: | 66 private: |
66 Path2D() : CanvasPathMethods() {} | 67 Path2D() : CanvasPathMethods() {} |
67 | 68 |
68 Path2D(const Path& path) : CanvasPathMethods(path) {} | 69 Path2D(const Path& path) : CanvasPathMethods(path) {} |
69 | 70 |
70 Path2D(Path2D* path) : CanvasPathMethods(path->path()) {} | 71 Path2D(Path2D* path) : CanvasPathMethods(path->path()) {} |
71 | 72 |
72 Path2D(const String& pathData) : CanvasPathMethods() { | 73 Path2D(const String& pathData) : CanvasPathMethods() { |
73 buildPathFromString(pathData, m_path); | 74 buildPathFromString(pathData, m_path); |
74 } | 75 } |
75 }; | 76 }; |
76 | 77 |
77 } // namespace blink | 78 } // namespace blink |
78 | 79 |
79 #endif // Path2D_h | 80 #endif // Path2D_h |
OLD | NEW |