| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 , origin(useOrigin) | 38 , origin(useOrigin) |
| 39 , angle(useAngle) | 39 , angle(useAngle) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 SVGMarkerType type; | 43 SVGMarkerType type; |
| 44 FloatPoint origin; | 44 FloatPoint origin; |
| 45 float angle; | 45 float angle; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 class RenderSVGResourceMarker; | 48 class LayoutSVGResourceMarker; |
| 49 | 49 |
| 50 class SVGMarkerData { | 50 class SVGMarkerData { |
| 51 public: | 51 public: |
| 52 SVGMarkerData(Vector<MarkerPosition>& positions, bool autoStartReverse) | 52 SVGMarkerData(Vector<MarkerPosition>& positions, bool autoStartReverse) |
| 53 : m_positions(positions) | 53 : m_positions(positions) |
| 54 , m_elementIndex(0) | 54 , m_elementIndex(0) |
| 55 , m_autoStartReverse(autoStartReverse) | 55 , m_autoStartReverse(autoStartReverse) |
| 56 { | 56 { |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 72 // Update our marker data for this element. | 72 // Update our marker data for this element. |
| 73 markerData->updateMarkerDataForPathElement(element); | 73 markerData->updateMarkerDataForPathElement(element); |
| 74 ++markerData->m_elementIndex; | 74 ++markerData->m_elementIndex; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void pathIsDone() | 77 void pathIsDone() |
| 78 { | 78 { |
| 79 m_positions.append(MarkerPosition(EndMarker, m_origin, currentAngle(EndM
arker))); | 79 m_positions.append(MarkerPosition(EndMarker, m_origin, currentAngle(EndM
arker))); |
| 80 } | 80 } |
| 81 | 81 |
| 82 static inline RenderSVGResourceMarker* markerForType(const SVGMarkerType& ty
pe, RenderSVGResourceMarker* markerStart, RenderSVGResourceMarker* markerMid, Re
nderSVGResourceMarker* markerEnd) | 82 static inline LayoutSVGResourceMarker* markerForType(const SVGMarkerType& ty
pe, LayoutSVGResourceMarker* markerStart, LayoutSVGResourceMarker* markerMid, La
youtSVGResourceMarker* markerEnd) |
| 83 { | 83 { |
| 84 switch (type) { | 84 switch (type) { |
| 85 case StartMarker: | 85 case StartMarker: |
| 86 return markerStart; | 86 return markerStart; |
| 87 case MidMarker: | 87 case MidMarker: |
| 88 return markerMid; | 88 return markerMid; |
| 89 case EndMarker: | 89 case EndMarker: |
| 90 return markerEnd; | 90 return markerEnd; |
| 91 } | 91 } |
| 92 | 92 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 FloatPoint m_origin; | 166 FloatPoint m_origin; |
| 167 FloatPoint m_subpathStart; | 167 FloatPoint m_subpathStart; |
| 168 FloatPoint m_inslopePoints[2]; | 168 FloatPoint m_inslopePoints[2]; |
| 169 FloatPoint m_outslopePoints[2]; | 169 FloatPoint m_outslopePoints[2]; |
| 170 bool m_autoStartReverse; | 170 bool m_autoStartReverse; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } | 173 } |
| 174 | 174 |
| 175 #endif // SVGMarkerData_h | 175 #endif // SVGMarkerData_h |
| OLD | NEW |