Add lcd_set_bg_color_layer0
This commit is contained in:
@@ -104,7 +104,7 @@ void main(void) {
|
||||
#### Drawing text on the screen
|
||||
|
||||
```c
|
||||
void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, sFONT *font);
|
||||
void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font);
|
||||
```
|
||||
|
||||
```c
|
||||
@@ -116,7 +116,7 @@ void main(void) {
|
||||
...
|
||||
lcd_init(true);
|
||||
...
|
||||
lcd_display_text("This is a text string.", 10, 10, LCD_GREEN, LCD_FONT16);
|
||||
lcd_display_text("This is a text string.", 10, 10, LCD_GREEN, LCD_BLACK, LCD_FONT16);
|
||||
}
|
||||
```
|
||||
Display text on the LCD screen in a certain color. When text width exceeds BSP_LCD_GetXSize(), a text wrap will be performed. If the text wrap is between two will be injected.
|
||||
@@ -279,3 +279,20 @@ void main(void) {
|
||||
```
|
||||
|
||||
Clears all text strings on the LCD screen.
|
||||
|
||||
#### Clearing (background/images) layer 0 to color
|
||||
```c
|
||||
void lcd_set_bg_color_layer0(uint32_t color);
|
||||
```
|
||||
|
||||
```c
|
||||
#include "lcd_api.h"
|
||||
|
||||
void main(void) {
|
||||
...
|
||||
lcd_init(true);
|
||||
lcd_draw_img_from_fs("st.bmp", 300, 100);
|
||||
...
|
||||
lcd_set_bg_color_layer0(LCD_BLACK);
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user