OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008 Holger Hans Peter Freyther | 6 * Copyright (C) 2008 Holger Hans Peter Freyther |
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // a multiple of two, and is at most the number of glyphs * 2 in the TextRun | 128 // a multiple of two, and is at most the number of glyphs * 2 in the TextRun |
129 // part of TextRunPaintInfo. Specify bounds for the upper and lower extend of | 129 // part of TextRunPaintInfo. Specify bounds for the upper and lower extend of |
130 // a line crossing through the text, parallel to the baseline. | 130 // a line crossing through the text, parallel to the baseline. |
131 // TODO(drott): crbug.com/655154 Fix this for | 131 // TODO(drott): crbug.com/655154 Fix this for |
132 // upright in vertical. | 132 // upright in vertical. |
133 void GetTextIntercepts(const TextRunPaintInfo&, | 133 void GetTextIntercepts(const TextRunPaintInfo&, |
134 float device_scale_factor, | 134 float device_scale_factor, |
135 const PaintFlags&, | 135 const PaintFlags&, |
136 const std::tuple<float, float>& bounds, | 136 const std::tuple<float, float>& bounds, |
137 Vector<TextIntercept>&) const; | 137 Vector<TextIntercept>&) const; |
| 138 void GetTextIntercepts(const TextFragmentPaintInfo&, |
| 139 float device_scale_factor, |
| 140 const PaintFlags&, |
| 141 const std::tuple<float, float>& bounds, |
| 142 Vector<TextIntercept>&) const; |
138 | 143 |
139 // Glyph bounds will be the minimum rect containing all glyph strokes, in | 144 // Glyph bounds will be the minimum rect containing all glyph strokes, in |
140 // coordinates using (<text run x position>, <baseline position>) as the | 145 // coordinates using (<text run x position>, <baseline position>) as the |
141 // origin. | 146 // origin. |
142 float Width(const TextRun&, | 147 float Width(const TextRun&, |
143 HashSet<const SimpleFontData*>* fallback_fonts = nullptr, | 148 HashSet<const SimpleFontData*>* fallback_fonts = nullptr, |
144 FloatRect* glyph_bounds = nullptr) const; | 149 FloatRect* glyph_bounds = nullptr) const; |
145 | 150 |
146 int OffsetForPosition(const TextRun&, | 151 int OffsetForPosition(const TextRun&, |
147 float position, | 152 float position, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // advance an additional tab stop. | 259 // advance an additional tab stop. |
255 if (distance_to_tab_stop < font_data->SpaceWidth() / 2) | 260 if (distance_to_tab_stop < font_data->SpaceWidth() / 2) |
256 distance_to_tab_stop += base_tab_width; | 261 distance_to_tab_stop += base_tab_width; |
257 | 262 |
258 return distance_to_tab_stop; | 263 return distance_to_tab_stop; |
259 } | 264 } |
260 | 265 |
261 } // namespace blink | 266 } // namespace blink |
262 | 267 |
263 #endif | 268 #endif |
OLD | NEW |