|
| void | OpenFontRender::setFontColor (uint16_t font_color) |
| | Specify the text color.
|
| |
| void | OpenFontRender::setBackgroundColor (uint16_t font_bgcolor) |
| | Specify the background color.
|
| |
| void | OpenFontRender::setFontColor (uint16_t font_color, uint16_t font_bgcolor) |
| | Specify the text color and background color.
|
| |
| void | OpenFontRender::setFontColor (uint8_t r, uint8_t g, uint8_t b) |
| | Specify the text color.
|
| |
| void | OpenFontRender::setBackgroundColor (uint8_t r, uint8_t g, uint8_t b) |
| | Specify the background color.
|
| |
| void | OpenFontRender::setFontColor (uint8_t fr, uint8_t fg, uint8_t fb, uint8_t br, uint8_t bg, uint8_t bb) |
| | Specify the text color and background color..
|
| |
| uint16_t | OpenFontRender::getFontColor () |
| | Get the current text color.
|
| |
| uint16_t | OpenFontRender::getBackgroundColor () |
| | Get the current background color.
|
| |
| void | OpenFontRender::setFontSize (unsigned int pixel) |
| | Set the font size for rendering.
|
| |
| unsigned int | OpenFontRender::getFontSize () |
| | Get the current font size.
|
| |
| double | OpenFontRender::setLineSpaceRatio (double line_space_ratio) |
| | Adjusts the width between lines of text.
|
| |
| double | OpenFontRender::getLineSpaceRatio () |
| | Get the current line space ratio.
|
| |
This is a group of methods related to font control.
◆ getBackgroundColor()
| uint16_t OpenFontRender::getBackgroundColor |
( |
| ) |
|
Get the current background color.
- Returns
- Current background color.
◆ getFontColor()
| uint16_t OpenFontRender::getFontColor |
( |
| ) |
|
Get the current text color.
- Returns
- Current text color.
◆ getFontSize()
| unsigned int OpenFontRender::getFontSize |
( |
| ) |
|
Get the current font size.
- Returns
- Current font size.
◆ getLineSpaceRatio()
| double OpenFontRender::getLineSpaceRatio |
( |
| ) |
|
Get the current line space ratio.
- Returns
- Current line space ratio.
◆ setBackgroundColor() [1/2]
| void OpenFontRender::setBackgroundColor |
( |
uint16_t |
font_bgcolor | ) |
|
Specify the background color.
- Parameters
-
| [in] | (font_bgcolor) | 16 bit rgb color for background. |
◆ setBackgroundColor() [2/2]
| void OpenFontRender::setBackgroundColor |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
Specify the background color.
- Parameters
-
| [in] | (r) | Red color (8bit) for background. |
| [in] | (g) | Green color (8bit) for background. |
| [in] | (b) | Blue color (8bit) for background. |
◆ setFontColor() [1/4]
| void OpenFontRender::setFontColor |
( |
uint16_t |
font_color | ) |
|
Specify the text color.
- Parameters
-
| [in] | (font_color) | 16 bit rgb color for text. |
◆ setFontColor() [2/4]
| void OpenFontRender::setFontColor |
( |
uint16_t |
font_color, |
|
|
uint16_t |
font_bgcolor |
|
) |
| |
Specify the text color and background color.
- Parameters
-
| [in] | (font_color) | 16 bit rgb color for text. |
| [in] | (font_bgcolor) | 16 bit rgb color for background. |
◆ setFontColor() [3/4]
| void OpenFontRender::setFontColor |
( |
uint8_t |
fr, |
|
|
uint8_t |
fg, |
|
|
uint8_t |
fb, |
|
|
uint8_t |
br, |
|
|
uint8_t |
bg, |
|
|
uint8_t |
bb |
|
) |
| |
Specify the text color and background color..
- Parameters
-
| [in] | (fr) | Red color (8bit) for text. |
| [in] | (fg) | Green color (8bit) for text. |
| [in] | (fb) | Blue color (8bit) for text. |
| [in] | (br) | Red color (8bit) for background. |
| [in] | (bg) | Green color (8bit) for background. |
| [in] | (bb) | Blue color (8bit) for background. |
◆ setFontColor() [4/4]
| void OpenFontRender::setFontColor |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
Specify the text color.
- Parameters
-
| [in] | (r) | Red color (8bit) for text. |
| [in] | (g) | Green color (8bit) for text. |
| [in] | (b) | Blue color (8bit) for text. |
◆ setFontSize()
| void OpenFontRender::setFontSize |
( |
unsigned int |
pixel | ) |
|
Set the font size for rendering.
- Parameters
-
- Note
- Default size is
44.
-
It will draw larger characters in proportion to the size of the number you set.
◆ setLineSpaceRatio()
| double OpenFontRender::setLineSpaceRatio |
( |
double |
line_space_ratio | ) |
|
Adjusts the width between lines of text.
- Parameters
-
| [in] | (line_space_ratio) | Correction rate for line spacing greater than 0. |
- Note
- Default rate is
1.0.
-
The larger the value, the wider the line spacing.