OpenTTD Source: FallbackParagraphLayout::FallbackVisualRun Class Reference

OpenTTD Source 13.2.1

Public Member Functions | Private Attributes
FallbackParagraphLayout::FallbackVisualRun Class Reference

Visual run contains data about the bit of text with the same font. More...

Inheritance diagram for FallbackParagraphLayout::FallbackVisualRun:

## 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.
| ~FallbackVisualRun () override
| Free all data.
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.

## Detailed Description

Visual run contains data about the bit of text with the same font.

Definition at line 252 of file gfx_layout.cpp.

## Constructor & Destructor Documentation

## ◆ FallbackVisualRun()

FallbackParagraphLayout::FallbackVisualRun::FallbackVisualRun | ( | Font * | font,
|  | const WChar * | chars,
|  | int | char_count,
|  | int | x
| ) |  |

Create the visual run.

Parameters

  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 334 of file gfx_layout.cpp.

## Member Function Documentation

## ◆ GetFont()

const Font * FallbackParagraphLayout::FallbackVisualRun::GetFont | ( |  | ) | const
| overridevirtual

Get the font associated with this run.

Returns
  The font.

Implements ParagraphLayouter::VisualRun.

Definition at line 384 of file gfx_layout.cpp.

## ◆ GetGlyphCount()

int FallbackParagraphLayout::FallbackVisualRun::GetGlyphCount | ( |  | ) | const
| overridevirtual

Get the number of glyphs in this run.

Returns
  The number of glyphs.

Implements ParagraphLayouter::VisualRun.

Definition at line 393 of file gfx_layout.cpp.

## ◆ GetGlyphs()

const GlyphID * FallbackParagraphLayout::FallbackVisualRun::GetGlyphs | ( |  | ) | const
| overridevirtual

Get the glyphs of this run.

Returns
  The glyphs.

Implements ParagraphLayouter::VisualRun.

Definition at line 402 of file gfx_layout.cpp.

## ◆ GetGlyphToCharMap()

const int * FallbackParagraphLayout::FallbackVisualRun::GetGlyphToCharMap | ( |  | ) | const
| overridevirtual

Get the glyph-to-character map for this visual run.

Returns
  The glyph-to-character map.

Implements ParagraphLayouter::VisualRun.

Definition at line 420 of file gfx_layout.cpp.

## ◆ GetLeading()

int FallbackParagraphLayout::FallbackVisualRun::GetLeading | ( |  | ) | const
| overridevirtual

Get the height of this font.

Returns
  The height of the font.

Implements ParagraphLayouter::VisualRun.

Definition at line 429 of file gfx_layout.cpp.

## ◆ GetPositions()

const float * FallbackParagraphLayout::FallbackVisualRun::GetPositions | ( |  | ) | const
| overridevirtual

Get the positions of this run.

Returns
  The positions.

Implements ParagraphLayouter::VisualRun.

Definition at line 411 of file gfx_layout.cpp.

The documentation for this class was generated from the following file:

- src/gfx_layout.cpp