Skip to main content

StringVisuals

The visual elements when writing a string.

Public Functions

StringVisuals()
Initializes a new instance of the LCD class.
StringVisuals(const Font * font, colortype color, uint8_t alpha, Alignment alignment, int16_t linespace, TextRotation rotation, TextDirection textDirection, uint8_t indentation, WideTextAction wideTextAction =WIDE_TEXT_NONE)
Construct a StringVisual object for rendering text.

Public Attributes

Alignmentalignment
The alignment to use. Default is LEFT.
uint8_talpha
8-bit alpha value. Default is 255 (solid).
colortypecolor
RGB color value. Default is 0 (black).
const Font *font
The font to use.
uint8_tindentation
Indentation of text inside rectangle. Text will start this far from the left/right edge.
int16_tlinespace
Line space in pixels for multiline strings. Default is 0.
TextRotationrotation
Orientation (rotation) of the text. Default is TEXT_ROTATE_0.
TextDirectiontextDirection
The direction to use. Default is LTR.
WideTextActionwideTextAction
What to do with wide text lines.

Public Functions Documentation

StringVisuals

Initializes a new instance of the LCD class.

StringVisuals

StringVisuals(const Font *font ,
colortypecolor ,
uint8_talpha ,
Alignmentalignment ,
int16_tlinespace ,
TextRotationrotation ,
TextDirectiontextDirection ,
uint8_tindentation ,
WideTextActionwideTextAction =WIDE_TEXT_NONE
)

Construct a StringVisual object for rendering text.

Parameters:
fontThe Font with which to draw the text.
colorThe color with which to draw the text.
alphaAlpha blending. Default value is 255 (solid)
alignmentHow to align the text.
linespaceLine space in pixels between each line, in case the text contains newline characters.
rotationHow to rotate the text.
textDirectionThe text direction.
indentationThe indentation of the text from the left and right of the text area rectangle.
wideTextAction(Optional) What to do with lines longer than the width of the TextArea.

Public Attributes Documentation

alignment

Alignment alignment

The alignment to use. Default is LEFT.

alpha

uint8_t alpha

8-bit alpha value. Default is 255 (solid).

color

colortype color

RGB color value. Default is 0 (black).

font

const Font * font

The font to use.

indentation

uint8_t indentation

Indentation of text inside rectangle. Text will start this far from the left/right edge.

linespace

int16_t linespace

Line space in pixels for multiline strings. Default is 0.

rotation

TextRotation rotation

Orientation (rotation) of the text. Default is TEXT_ROTATE_0.

textDirection

TextDirection textDirection

The direction to use. Default is LTR.

wideTextAction

WideTextAction wideTextAction

What to do with wide text lines.