LuciadCPillar 2023.1.04
luciad::TextBlock::Builder Class Referencefinal

A factory class that creates a TextBlock containing multiple lines of text with multiple styles. More...

#include <luciad/text/TextBlock.h>

Public Member Functions

TextBlock build () &
 Returns the current text. More...
 
TextBlock build () &&
 Returns the current text. More...
 
TextBlock::LineBuilder newLine (HorizontalAlignment alignment=HorizontalAlignment::Left, double verticalSpacing=0.0)
 Add a new line to the current set of lines. More...
 

Detailed Description

A factory class that creates a TextBlock containing multiple lines of text with multiple styles.

Since
2021.0

Member Function Documentation

◆ build() [1/2]

TextBlock luciad::TextBlock::Builder::build ( ) &

Returns the current text.

Returns
the current text.

◆ build() [2/2]

TextBlock luciad::TextBlock::Builder::build ( ) &&

Returns the current text.

Returns
the current text.

◆ newLine()

TextBlock::LineBuilder luciad::TextBlock::Builder::newLine ( HorizontalAlignment  alignment = HorizontalAlignment::Left,
double  verticalSpacing = 0.0 
)

Add a new line to the current set of lines.

Each line can have multiple strings with different styling options. See TextBlock::LineBuilder.

Parameters
alignmentposition of the text relative to the whole block of the text. By default the text is positioned at the left.
verticalSpacingextra space between this line and the next line in pixels.
Returns
the new line on which you can add text.