|
OpenTTD Source
1.10.0-RC1
|
Visual run contains data about the bit of text with the same font. More...
Public Member Functions | |
| FallbackVisualRun (Font *font, const WChar *chars, int glyph_count, int x) | |
| Create the visual run. More... | |
| FallbackVisualRun (FallbackVisualRun &&other) noexcept | |
| Move constructor for visual runs. More... | |
| ~FallbackVisualRun () override | |
| Free all data. More... | |
| const Font * | GetFont () const override |
| Get the font associated with this run. More... | |
| int | GetGlyphCount () const override |
| Get the number of glyphs in this run. More... | |
| const GlyphID * | GetGlyphs () const override |
| Get the glyphs of this run. More... | |
| const float * | GetPositions () const override |
| Get the positions of this run. More... | |
| int | GetLeading () const override |
| Get the height of this font. More... | |
| const int * | GetGlyphToCharMap () const override |
| Get the glyph-to-character map for this visual run. More... | |
Private Attributes | |
| Font * | font |
| The font used to layout these. | |
| GlyphID * | glyphs |
| The glyphs we're drawing. | |
| float * | positions |
| The positions of the glyphs. | |
| int * | glyph_to_char |
| The char index of the glyphs. | |
| int | glyph_count |
| The number of glyphs. | |
Visual run contains data about the bit of text with the same font.
Definition at line 251 of file gfx_layout.cpp.
| FallbackParagraphLayout::FallbackVisualRun::FallbackVisualRun | ( | Font * | font, |
| const WChar * | chars, | ||
| int | char_count, | ||
| int | x | ||
| ) |
Create the visual run.
| font | The font to use for this run. |
| chars | The characters to use for this run. |
| char_count | The number of characters in this run. |
| x | The initial x position for this run. |
Definition at line 333 of file gfx_layout.cpp.
|
noexcept |
Move constructor for visual runs.
Definition at line 353 of file gfx_layout.cpp.
References glyph_to_char, glyphs, and positions.
|
override |
Free all data.
Definition at line 365 of file gfx_layout.cpp.
References free(), glyph_to_char, glyphs, and positions.
|
overridevirtual |
Get the font associated with this run.
Implements ParagraphLayouter::VisualRun.
Definition at line 376 of file gfx_layout.cpp.
References font.
Referenced by GetLeading().
|
overridevirtual |
Get the number of glyphs in this run.
Implements ParagraphLayouter::VisualRun.
Definition at line 385 of file gfx_layout.cpp.
References glyph_count.
|
overridevirtual |
Get the glyphs of this run.
Implements ParagraphLayouter::VisualRun.
Definition at line 394 of file gfx_layout.cpp.
References glyphs.
|
overridevirtual |
Get the glyph-to-character map for this visual run.
Implements ParagraphLayouter::VisualRun.
Definition at line 412 of file gfx_layout.cpp.
References glyph_to_char.
|
overridevirtual |
Get the height of this font.
Implements ParagraphLayouter::VisualRun.
Definition at line 421 of file gfx_layout.cpp.
References GetFont().
|
overridevirtual |
Get the positions of this run.
Implements ParagraphLayouter::VisualRun.
Definition at line 403 of file gfx_layout.cpp.
References positions.