OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010-2012. 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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 */ | 18 */ |
19 | 19 |
20 #ifndef SVGTextLayoutEngine_h | 20 #ifndef SVGTextLayoutEngine_h |
21 #define SVGTextLayoutEngine_h | 21 #define SVGTextLayoutEngine_h |
22 | 22 |
| 23 #include "core/layout/api/LineLayoutSVGInlineText.h" |
23 #include "core/layout/svg/LayoutSVGInlineText.h" | 24 #include "core/layout/svg/LayoutSVGInlineText.h" |
24 #include "core/layout/svg/SVGTextFragment.h" | 25 #include "core/layout/svg/SVGTextFragment.h" |
25 #include "core/layout/svg/SVGTextLayoutAttributes.h" | 26 #include "core/layout/svg/SVGTextLayoutAttributes.h" |
26 #include "core/layout/svg/SVGTextMetrics.h" | 27 #include "core/layout/svg/SVGTextMetrics.h" |
27 #include "platform/graphics/Path.h" | 28 #include "platform/graphics/Path.h" |
28 #include "wtf/Allocator.h" | 29 #include "wtf/Allocator.h" |
29 #include "wtf/Vector.h" | 30 #include "wtf/Vector.h" |
30 | 31 |
31 namespace blink { | 32 namespace blink { |
32 | 33 |
(...skipping 26 matching lines...) Expand all Loading... |
59 void updateCharacterPositionIfNeeded(float& x, float& y); | 60 void updateCharacterPositionIfNeeded(float& x, float& y); |
60 void updateCurrentTextPosition(float x, float y, float glyphAdvance); | 61 void updateCurrentTextPosition(float x, float y, float glyphAdvance); |
61 void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy); | 62 void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy); |
62 | 63 |
63 void recordTextFragment(SVGInlineTextBox*); | 64 void recordTextFragment(SVGInlineTextBox*); |
64 | 65 |
65 void beginTextPathLayout(SVGInlineFlowBox*); | 66 void beginTextPathLayout(SVGInlineFlowBox*); |
66 void endTextPathLayout(); | 67 void endTextPathLayout(); |
67 | 68 |
68 void layoutInlineTextBox(SVGInlineTextBox*); | 69 void layoutInlineTextBox(SVGInlineTextBox*); |
69 void layoutTextOnLineOrPath(SVGInlineTextBox*, const LayoutSVGInlineText&, c
onst ComputedStyle&); | 70 void layoutTextOnLineOrPath(SVGInlineTextBox*, LineLayoutSVGInlineText, cons
t ComputedStyle&); |
70 | 71 |
71 bool currentLogicalCharacterAttributes(SVGTextLayoutAttributes*&); | 72 bool currentLogicalCharacterAttributes(SVGTextLayoutAttributes*&); |
72 bool currentLogicalCharacterMetrics(SVGTextLayoutAttributes*&, SVGTextMetric
s&); | 73 bool currentLogicalCharacterMetrics(SVGTextLayoutAttributes*&, SVGTextMetric
s&); |
73 void advanceToNextLogicalCharacter(const SVGTextMetrics&); | 74 void advanceToNextLogicalCharacter(const SVGTextMetrics&); |
74 | 75 |
75 private: | 76 private: |
76 Vector<SVGTextLayoutAttributes*>& m_layoutAttributes; | 77 Vector<SVGTextLayoutAttributes*>& m_layoutAttributes; |
77 | 78 |
78 Vector<SVGInlineTextBox*> m_lineLayoutBoxes; | 79 Vector<SVGInlineTextBox*> m_lineLayoutBoxes; |
79 | 80 |
(...skipping 15 matching lines...) Expand all Loading... |
95 float m_textPathLength; | 96 float m_textPathLength; |
96 float m_textPathStartOffset; | 97 float m_textPathStartOffset; |
97 float m_textPathCurrentOffset; | 98 float m_textPathCurrentOffset; |
98 float m_textPathSpacing; | 99 float m_textPathSpacing; |
99 float m_textPathScaling; | 100 float m_textPathScaling; |
100 }; | 101 }; |
101 | 102 |
102 } // namespace blink | 103 } // namespace blink |
103 | 104 |
104 #endif | 105 #endif |
OLD | NEW |