OpenTTD Source: ICUParagraphLayout::ICUVisualRun Class Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Private Attributes
ICUParagraphLayout::ICUVisualRun Class Reference

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

Inheritance diagram for ICUParagraphLayout::ICUVisualRun:

## Public Member Functions
| ICUVisualRun (const ICURun &run, int x)
| Constructor for a new ICUVisualRun.
std::span< const GlyphID > | GetGlyphs () const override
std::span< const Position > | GetPositions () const override
std::span< const int > | GetGlyphToCharMap () const override
const Font * | GetFont () const override
int | GetLeading () const override
int | GetGlyphCount () const override
int | GetAdvance () const

## Private Attributes
std::vector< GlyphID > | glyphs
std::vector< Position > | positions
std::vector< int > | glyph_to_char
int | total_advance
const Font * | font

## Detailed Description

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

Definition at line 62 of file gfx_layout_icu.cpp.

## Constructor & Destructor Documentation

## ◆ ICUVisualRun()

ICUParagraphLayout::ICUVisualRun::ICUVisualRun | ( | const ICURun & | run,
|  | int | x
| ) |  |

Constructor for a new ICUVisualRun.

It bases all information on the ICURun, which should already be shaped.

Parameters

  run | The ICURun to base the visual run on.
  x | The offset of the run on the line.

Definition at line 131 of file gfx_layout_icu.cpp.

References ICURun::positions.

## Member Function Documentation

## ◆ GetAdvance()

int ICUParagraphLayout::ICUVisualRun::GetAdvance | ( |  | ) | const
| inline

Definition at line 81 of file gfx_layout_icu.cpp.

## ◆ GetFont()

const Font * ICUParagraphLayout::ICUVisualRun::GetFont | ( |  | ) | const
| inlineoverridevirtual

Implements ParagraphLayouter::VisualRun.

Definition at line 78 of file gfx_layout_icu.cpp.

## ◆ GetGlyphCount()

int ICUParagraphLayout::ICUVisualRun::GetGlyphCount | ( |  | ) | const
| inlineoverridevirtual

Implements ParagraphLayouter::VisualRun.

Definition at line 80 of file gfx_layout_icu.cpp.

## ◆ GetGlyphs()

std::span< const GlyphID > ICUParagraphLayout::ICUVisualRun::GetGlyphs | ( |  | ) | const
| inlineoverridevirtual

Implements ParagraphLayouter::VisualRun.

Definition at line 74 of file gfx_layout_icu.cpp.

## ◆ GetGlyphToCharMap()

std::span< const int > ICUParagraphLayout::ICUVisualRun::GetGlyphToCharMap | ( |  | ) | const
| inlineoverridevirtual

Implements ParagraphLayouter::VisualRun.

Definition at line 76 of file gfx_layout_icu.cpp.

## ◆ GetLeading()

int ICUParagraphLayout::ICUVisualRun::GetLeading | ( |  | ) | const
| inlineoverridevirtual

Implements ParagraphLayouter::VisualRun.

Definition at line 79 of file gfx_layout_icu.cpp.

## ◆ GetPositions()

std::span< const Position > ICUParagraphLayout::ICUVisualRun::GetPositions | ( |  | ) | const
| inlineoverridevirtual

Implements ParagraphLayouter::VisualRun.

Definition at line 75 of file gfx_layout_icu.cpp.

## Field Documentation

## ◆ font

const Font* ICUParagraphLayout::ICUVisualRun::font
| private

Definition at line 69 of file gfx_layout_icu.cpp.

## ◆ glyph_to_char

std::vector<int> ICUParagraphLayout::ICUVisualRun::glyph_to_char
| private

Definition at line 66 of file gfx_layout_icu.cpp.

## ◆ glyphs

std::vector<GlyphID> ICUParagraphLayout::ICUVisualRun::glyphs
| private

Definition at line 64 of file gfx_layout_icu.cpp.

## ◆ positions

std::vector<Position> ICUParagraphLayout::ICUVisualRun::positions
| private

Definition at line 65 of file gfx_layout_icu.cpp.

## ◆ total_advance

int ICUParagraphLayout::ICUVisualRun::total_advance
| private

Definition at line 68 of file gfx_layout_icu.cpp.

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

- src/gfx_layout_icu.cpp