OpenTTD
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:
ParagraphLayouter::VisualRun

Public Member Functions

 FallbackVisualRun (Font *font, const WChar *chars, int glyph_count, int x)
 Create the visual run.
 ~FallbackVisualRun ()
 Free all data.
const Font * GetFont () const
 Get the font associated with this run.
int GetGlyphCount () const
 Get the number of glyphs in this run.
const GlyphIDGetGlyphs () const
 Get the glyphs of this run.
const float * GetPositions () const
 Get the positions of this run.
int GetLeading () const
 Get the height of this font.
const int * GetGlyphToCharMap () const
 Get the glyph-to-character map for this visual run.

Private Attributes

Font * font
 The font used to layout these.
GlyphIDglyphs
 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 245 of file gfx_layout.cpp.

Constructor & Destructor Documentation

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

Create the visual run.

Parameters
fontThe font to use for this run.
charsThe characters to use for this run.
char_countThe number of characters in this run.
xThe initial x position for this run.

Definition at line 290 of file gfx_layout.cpp.

References glyph_count, glyph_to_char, glyphs, and positions.

FallbackParagraphLayout::FallbackVisualRun::~FallbackVisualRun ( )

Free all data.

Definition at line 310 of file gfx_layout.cpp.

References free().

Member Function Documentation

const Font * FallbackParagraphLayout::FallbackVisualRun::GetFont ( ) const
virtual

Get the font associated with this run.

Returns
The font.

Implements ParagraphLayouter::VisualRun.

Definition at line 321 of file gfx_layout.cpp.

int FallbackParagraphLayout::FallbackVisualRun::GetGlyphCount ( ) const
virtual

Get the number of glyphs in this run.

Returns
The number of glyphs.

Implements ParagraphLayouter::VisualRun.

Definition at line 330 of file gfx_layout.cpp.

const GlyphID * FallbackParagraphLayout::FallbackVisualRun::GetGlyphs ( ) const
virtual

Get the glyphs of this run.

Returns
The glyphs.

Implements ParagraphLayouter::VisualRun.

Definition at line 339 of file gfx_layout.cpp.

const int * FallbackParagraphLayout::FallbackVisualRun::GetGlyphToCharMap ( ) const
virtual

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

Returns
The glyph-to-character map.

Implements ParagraphLayouter::VisualRun.

Definition at line 357 of file gfx_layout.cpp.

int FallbackParagraphLayout::FallbackVisualRun::GetLeading ( ) const
virtual

Get the height of this font.

Returns
The height of the font.

Implements ParagraphLayouter::VisualRun.

Definition at line 366 of file gfx_layout.cpp.

const float * FallbackParagraphLayout::FallbackVisualRun::GetPositions ( ) const
virtual

Get the positions of this run.

Returns
The positions.

Implements ParagraphLayouter::VisualRun.

Definition at line 348 of file gfx_layout.cpp.


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