| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef SVGPathSeg_h | 21 #ifndef SVGPathSeg_h |
| 22 #define SVGPathSeg_h | 22 #define SVGPathSeg_h |
| 23 | 23 |
| 24 #include "bindings/core/v8/ScriptWrappable.h" | 24 #include "bindings/core/v8/ScriptWrappable.h" |
| 25 #include "platform/geometry/FloatPoint.h" | 25 #include "platform/geometry/FloatPoint.h" |
| 26 #include "platform/heap/Handle.h" | 26 #include "platform/heap/Handle.h" |
| 27 #include "wtf/Allocator.h" |
| 27 #include "wtf/RefCounted.h" | 28 #include "wtf/RefCounted.h" |
| 28 #include "wtf/text/WTFString.h" | 29 #include "wtf/text/WTFString.h" |
| 29 | 30 |
| 30 namespace blink { | 31 namespace blink { |
| 31 | 32 |
| 32 enum ListModification { | 33 enum ListModification { |
| 33 ListModificationUnknown = 0, | 34 ListModificationUnknown = 0, |
| 34 ListModificationInsert = 1, | 35 ListModificationInsert = 1, |
| 35 ListModificationReplace = 2, | 36 ListModificationReplace = 2, |
| 36 ListModificationRemove = 3, | 37 ListModificationRemove = 3, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 66 return type >= PathSegMoveToAbs ? static_cast<SVGPathSegType>(type & ~1u) :
type; | 67 return type >= PathSegMoveToAbs ? static_cast<SVGPathSegType>(type & ~1u) :
type; |
| 67 } | 68 } |
| 68 | 69 |
| 69 static inline bool isAbsolutePathSegType(const SVGPathSegType type) | 70 static inline bool isAbsolutePathSegType(const SVGPathSegType type) |
| 70 { | 71 { |
| 71 // For commands with an ordinal >= PathSegMoveToAbs, and odd number => relat
ive command. | 72 // For commands with an ordinal >= PathSegMoveToAbs, and odd number => relat
ive command. |
| 72 return type < PathSegMoveToAbs || type % 2 == 0; | 73 return type < PathSegMoveToAbs || type % 2 == 0; |
| 73 } | 74 } |
| 74 | 75 |
| 75 struct PathSegmentData { | 76 struct PathSegmentData { |
| 77 STACK_ALLOCATED(); |
| 76 PathSegmentData() | 78 PathSegmentData() |
| 77 : command(PathSegUnknown) | 79 : command(PathSegUnknown) |
| 78 , arcSweep(false) | 80 , arcSweep(false) |
| 79 , arcLarge(false) | 81 , arcLarge(false) |
| 80 { | 82 { |
| 81 } | 83 } |
| 82 | 84 |
| 83 const FloatPoint& arcRadii() const { return point1; } | 85 const FloatPoint& arcRadii() const { return point1; } |
| 84 float arcAngle() const { return point2.x(); } | 86 float arcAngle() const { return point2.x(); } |
| 85 | 87 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 191 } |
| 190 | 192 |
| 191 private: | 193 private: |
| 192 float m_x; | 194 float m_x; |
| 193 float m_y; | 195 float m_y; |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 } // namespace blink | 198 } // namespace blink |
| 197 | 199 |
| 198 #endif // SVGPathSeg_h | 200 #endif // SVGPathSeg_h |
| OLD | NEW |