touchgfx::TextArea::setIndentation() is only used within TouchGFX.
 
Symbols
loading...
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXtouchgfx::TextArea::setIndentation()

touchgfx::TextArea::setIndentation() method

@fn inline void TextArea::setIndentation(uint8_t indent) Sets the indentation for the text. Sets the indentation for the text. This is very useful when a font is an italic font where letters such as "j" and "g" extend a lot to the left under the previous characters. if a line starts with a "j" or "g" this letter would either have to be pushed to the right to be able to see all of it, e.g. using spaces which would ruin a multi line text which is left aligned. This could be solved by changing a textarea.setPosition(50,50,100,100) to textarea.setPosition(45,50,110, 100) followed by a textarea.setIndentation(5). Characters that do not extend to the left under the previous characters will be drawn in the same position in either case, but "j" and "g" will be aligned with other lines. The function getMaxPixelsLeft() will give you the maximum number of pixels any glyph in the font extends to the left. @see getMaxPixelsLeft

Syntax

inline void setIndentation(uint8_t indent);

Arguments

indent

The indentation from left (when left aligned text) and right (when right aligned text).

References

LocationText
TextArea.hpp:218
inline void setIndentation(uint8_t indent)

Data Use

Data read by touchgfx::TextArea::setIndentation()
Data written by touchgfx::TextArea::setIndentation()
touchgfx::TextArea::setIndentation()
all items filtered out