OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2002, 2003 The Karbon Developers | 2 * Copyright (C) 2002, 2003 The Karbon Developers |
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> |
5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 private: | 64 private: |
65 bool initialCommandIsMoveTo(); | 65 bool initialCommandIsMoveTo(); |
66 bool parsePath(); | 66 bool parsePath(); |
67 bool parseAndNormalizePath(); | 67 bool parseAndNormalizePath(); |
68 | 68 |
69 SVGPathSource* m_source; | 69 SVGPathSource* m_source; |
70 SVGPathConsumer* m_consumer; | 70 SVGPathConsumer* m_consumer; |
71 }; | 71 }; |
72 | 72 |
| 73 class SVGPathNormalizer { |
| 74 STACK_ALLOCATED(); |
| 75 public: |
| 76 SVGPathNormalizer(SVGPathConsumer* consumer) |
| 77 : m_consumer(consumer) |
| 78 , m_lastCommand(PathSegUnknown) |
| 79 { |
| 80 ASSERT(m_consumer); |
| 81 } |
| 82 |
| 83 void emitSegment(const PathSegmentData&); |
| 84 |
| 85 private: |
| 86 bool decomposeArcToCubic(const FloatPoint& currentPoint, const PathSegmentDa
ta&); |
| 87 |
| 88 SVGPathConsumer* m_consumer; |
| 89 FloatPoint m_controlPoint; |
| 90 FloatPoint m_currentPoint; |
| 91 FloatPoint m_subPathPoint; |
| 92 SVGPathSegType m_lastCommand; |
| 93 }; |
| 94 |
73 } // namespace blink | 95 } // namespace blink |
74 | 96 |
75 #endif // SVGPathParser_h | 97 #endif // SVGPathParser_h |
OLD | NEW |