Kanzi 3.9.10
kanzi::TextLayout Struct Reference

Structure for layout of arbitrary number of characters for text rendering. More...

#include <kanzi/core.ui/text/text_layout.hpp>

Public Member Functions

 TextLayout (const FontRuntime &font)
 Constructor.
 
 ~TextLayout ()
 Destructor.
 

Public Attributes

float bottom
 Y axis coordinate of the bottom side of the text bounds.
 
unsigned int characterCount
 Number of characters.
 
vector< CharacterLayoutcharacters
 Layouted characters of the text.
 
const FontRuntimefont
 Font used for rendering the text.
 
float height
 Height of the text bounds.
 
float left
 X axis coordinate of the left side of the text bounds.
 
unsigned int lineCount
 Number of lines.
 
bool overlaps
 If at least two characters overlap, set to true.
 
float right
 X axis coordinate of the right side of the text bounds.
 
float top
 Y axis coordinate of the top side of the text bounds.
 
bool truncated
 If the text does not fit in the given maximum bounds, set to true.
 
float width
 Width of the text bounds.
 

Detailed Description

Structure for layout of arbitrary number of characters for text rendering.

Constructor & Destructor Documentation

◆ TextLayout()

kanzi::TextLayout::TextLayout ( const FontRuntime & font)
explicit

Constructor.

Parameters
fontFont used for the layout.

◆ ~TextLayout()

kanzi::TextLayout::~TextLayout ( )

Destructor.

Member Data Documentation

◆ characters

vector<CharacterLayout> kanzi::TextLayout::characters

Layouted characters of the text.

◆ font

const FontRuntime& kanzi::TextLayout::font

Font used for rendering the text.

◆ left

float kanzi::TextLayout::left

X axis coordinate of the left side of the text bounds.

◆ top

float kanzi::TextLayout::top

Y axis coordinate of the top side of the text bounds.

◆ right

float kanzi::TextLayout::right

X axis coordinate of the right side of the text bounds.

◆ bottom

float kanzi::TextLayout::bottom

Y axis coordinate of the bottom side of the text bounds.

◆ width

float kanzi::TextLayout::width

Width of the text bounds.

◆ height

float kanzi::TextLayout::height

Height of the text bounds.

◆ lineCount

unsigned int kanzi::TextLayout::lineCount

Number of lines.

◆ characterCount

unsigned int kanzi::TextLayout::characterCount

Number of characters.

◆ truncated

bool kanzi::TextLayout::truncated

If the text does not fit in the given maximum bounds, set to true.

◆ overlaps

bool kanzi::TextLayout::overlaps

If at least two characters overlap, set to true.


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