OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TextPainter_h | 5 #ifndef TextPainter_h |
6 #define TextPainter_h | 6 #define TextPainter_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/style/ComputedStyleConstants.h" | 9 #include "core/style/ComputedStyleConstants.h" |
10 #include "platform/fonts/TextBlob.h" | 10 #include "platform/fonts/TextBlob.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 void setEmphasisMark(const AtomicString&, TextEmphasisPosition); | 46 void setEmphasisMark(const AtomicString&, TextEmphasisPosition); |
47 void setCombinedText(LayoutTextCombine* combinedText) { | 47 void setCombinedText(LayoutTextCombine* combinedText) { |
48 m_combinedText = combinedText; | 48 m_combinedText = combinedText; |
49 } | 49 } |
50 | 50 |
51 static void updateGraphicsContext(GraphicsContext&, | 51 static void updateGraphicsContext(GraphicsContext&, |
52 const Style&, | 52 const Style&, |
53 bool horizontal, | 53 bool horizontal, |
54 GraphicsContextStateSaver&); | 54 GraphicsContextStateSaver&); |
55 | 55 |
| 56 void clipDecorationsStripe(float upper, float stripeWidth, float dilation); |
56 void paint(unsigned startOffset, | 57 void paint(unsigned startOffset, |
57 unsigned endOffset, | 58 unsigned endOffset, |
58 unsigned length, | 59 unsigned length, |
59 const Style&, | 60 const Style&, |
60 TextBlobPtr* cachedTextBlob = 0); | 61 TextBlobPtr* cachedTextBlob = 0); |
61 | 62 |
62 struct Style { | 63 struct Style { |
63 STACK_ALLOCATED(); | 64 STACK_ALLOCATED(); |
64 Color currentColor; | 65 Color currentColor; |
65 Color fillColor; | 66 Color fillColor; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return rotationDirection == Clockwise | 140 return rotationDirection == Clockwise |
140 ? AffineTransform(0, 1, -1, 0, boxRect.x() + boxRect.maxY(), | 141 ? AffineTransform(0, 1, -1, 0, boxRect.x() + boxRect.maxY(), |
141 boxRect.y() - boxRect.x()) | 142 boxRect.y() - boxRect.x()) |
142 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.y(), | 143 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.y(), |
143 boxRect.x() + boxRect.maxY()); | 144 boxRect.x() + boxRect.maxY()); |
144 } | 145 } |
145 | 146 |
146 } // namespace blink | 147 } // namespace blink |
147 | 148 |
148 #endif // TextPainter_h | 149 #endif // TextPainter_h |
OLD | NEW |