LuciadCPillar 2023.1.04
luciad::TextStyle Class Referencefinal

This class contains styling properties to determine how text is painted. More...

#include <luciad/text/TextStyle.h>

Classes

class  Builder
 A builder class for creating text styles. More...
 

Public Member Functions

TextStyle::Builder asBuilder () const
 Creates a TextStyle builder that has all properties of this TextStyle. More...
 
const std::string & getFontName () const
 Returns the identifier of the font used for text rendering. More...
 
size_t getFontSize () const
 Returns the font size in pixels, where a pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths). More...
 
Color getHaloColor () const
 Returns the color of the halo (outline) around text. More...
 
double getHaloWidth () const
 Returns the size of the halo (outline) around text in pixels. More...
 
Color getTextColor () const
 Returns the text color. More...
 

Static Public Member Functions

static Builder newBuilder ()
 Creates a new builder for creating a TextStyle. More...
 

Detailed Description

This class contains styling properties to determine how text is painted.

Since
2020.2

Member Function Documentation

◆ asBuilder()

TextStyle::Builder luciad::TextStyle::asBuilder ( ) const

Creates a TextStyle builder that has all properties of this TextStyle.

Returns
a TextStyle builder that has all properties of this TextStyle.

◆ getFontName()

const std::string & luciad::TextStyle::getFontName ( ) const

Returns the identifier of the font used for text rendering.

Possible values: Serif, Sans, Arial Black, Arial Narrow, Calibri, Noto.

Returns
the identifier of the font used for text rendering.

◆ getFontSize()

size_t luciad::TextStyle::getFontSize ( ) const

Returns the font size in pixels, where a pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths).

Returns
the font size in pixels, where a pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths).

◆ getHaloColor()

Color luciad::TextStyle::getHaloColor ( ) const

Returns the color of the halo (outline) around text.

Returns
the color of the halo (outline) around text.

◆ getHaloWidth()

double luciad::TextStyle::getHaloWidth ( ) const

Returns the size of the halo (outline) around text in pixels.

If this value is equal to zero, no halo is drawn.

Returns
the size of the halo (outline) around text in pixels.

◆ getTextColor()

Color luciad::TextStyle::getTextColor ( ) const

Returns the text color.

Returns
the text color.

◆ newBuilder()

static Builder luciad::TextStyle::newBuilder ( )
static

Creates a new builder for creating a TextStyle.

Returns
a new builder for creating a TextStyle.