![]() |
TGX 1.0.3
A tiny 2D/3D graphics library optimized for 32 bits microcontrollers.
|
Define the GFXFont anf ILI9341_t3 font format if needed. More...
Go to the source code of this file.
Classes | |
struct | GFXfont |
GFXFont font format. More... | |
struct | ILI9341_t3_font_t |
ILI9341_t3 PJRC font format. More... | |
Functions | |
int | tgx::fontHeight (const GFXfont &font) |
Query the height of a font. More... | |
int | tgx::fontHeight (const ILI9341_t3_font_t &font) |
Query the height of a font. More... | |
iBox2 | tgx::measureChar (char c, iVec2 pos, const GFXfont &font, Anchor anchor=DEFAULT_TEXT_ANCHOR, int *xadvance=nullptr) |
Compute the bounding box of a character. More... | |
iBox2 | tgx::measureChar (char c, iVec2 pos, const ILI9341_t3_font_t &font, Anchor anchor=DEFAULT_TEXT_ANCHOR, int *xadvance=nullptr) |
Compute the bounding box of a character. More... | |
Define the GFXFont anf ILI9341_t3 font format if needed.
int tgx::fontHeight | ( | const GFXfont & | font | ) |
Query the height of a font.
overload for GFXfont.
font | The font. |
int tgx::fontHeight | ( | const ILI9341_t3_font_t & | font | ) |
Query the height of a font.
overload for ILI9341_t3_font_t.
font | The font. |
iBox2 tgx::measureChar | ( | char | c, |
iVec2 | pos, | ||
const GFXfont & | font, | ||
Anchor | anchor = DEFAULT_TEXT_ANCHOR , |
||
int * | xadvance = nullptr |
||
) |
Compute the bounding box of a character.
overload for GFXfont.
c | The character. | |
pos | position of the anchor point. | |
font | The font to use. | |
anchor | location of the anchor with respect to the char bounding box. (by default, this is the BASELINE|LEFT). | |
[in,out] | xadvance | If non-null, the number of pixel to advance horizontally after drawing the char is stored here. |
c
when draw with font
when its chosen anchor
is at pos
. iBox2 tgx::measureChar | ( | char | c, |
iVec2 | pos, | ||
const ILI9341_t3_font_t & | font, | ||
Anchor | anchor = DEFAULT_TEXT_ANCHOR , |
||
int * | xadvance = nullptr |
||
) |
Compute the bounding box of a character.
overload for ILI9341_t3_font_t.
c | The character. | |
pos | position of the anchor point. | |
font | The font to use. | |
anchor | location of the anchor with respect to the char bounding box. (by default, this is the BASELINE|LEFT). | |
[in,out] | xadvance | If non-null, the number of pixel to advance horizontally after drawing the char is stored here. |
c
when draw with font
when its chosen anchor
is at pos
.