| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_GFX_RENDER_TEXT_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_H_ |
| 6 #define UI_GFX_RENDER_TEXT_H_ | 6 #define UI_GFX_RENDER_TEXT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 Range char_range; | 164 Range char_range; |
| 165 | 165 |
| 166 // Index of the text run that generated this segment. | 166 // Index of the text run that generated this segment. |
| 167 size_t run; | 167 size_t run; |
| 168 | 168 |
| 169 // Returns the width of this line segment in text space. | 169 // Returns the width of this line segment in text space. |
| 170 float width() const { return x_range.length(); } | 170 float width() const { return x_range.length(); } |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 // A line of display text, comprised of a line segment list and some metrics. | 173 // A line of display text, comprised of a line segment list and some metrics. |
| 174 struct Line { | 174 struct GFX_EXPORT Line { |
| 175 Line(); | 175 Line(); |
| 176 Line(const Line& other); | 176 Line(const Line& other); |
| 177 ~Line(); | 177 ~Line(); |
| 178 | 178 |
| 179 // Segments that make up this line in visual order. | 179 // Segments that make up this line in visual order. |
| 180 std::vector<LineSegment> segments; | 180 std::vector<LineSegment> segments; |
| 181 | 181 |
| 182 // The sum of segment widths and the maximum of segment heights. | 182 // The sum of segment widths and the maximum of segment heights. |
| 183 SizeF size; | 183 SizeF size; |
| 184 | 184 |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 // Lines computed by EnsureLayout. These should be invalidated upon | 857 // Lines computed by EnsureLayout. These should be invalidated upon |
| 858 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 858 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
| 859 std::vector<internal::Line> lines_; | 859 std::vector<internal::Line> lines_; |
| 860 | 860 |
| 861 DISALLOW_COPY_AND_ASSIGN(RenderText); | 861 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 862 }; | 862 }; |
| 863 | 863 |
| 864 } // namespace gfx | 864 } // namespace gfx |
| 865 | 865 |
| 866 #endif // UI_GFX_RENDER_TEXT_H_ | 866 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |