Change images to DIFs for faster drawing
This commit is contained in:
BIN
fs/flowers.dif
Normal file
BIN
fs/flowers.dif
Normal file
Binary file not shown.
BIN
fs/flowers.png
BIN
fs/flowers.png
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
BIN
fs/mongoose-os.dif
Normal file
BIN
fs/mongoose-os.dif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
@ -37,7 +37,7 @@
|
||||
"w": 128,
|
||||
"h": 98,
|
||||
"type": 1,
|
||||
"img": "/mongoose-os.png"
|
||||
"img": "/mongoose-os.dif"
|
||||
},
|
||||
{
|
||||
"name": "flowers",
|
||||
@ -46,7 +46,7 @@
|
||||
"w": 106,
|
||||
"h": 98,
|
||||
"type": 1,
|
||||
"img": "/flowers.png"
|
||||
"img": "/flowers.dif"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ static void widget_default_draw(struct widget_t *w, uint16_t color) {
|
||||
|
||||
if (w->img) {
|
||||
mgos_ili9341_set_fgcolor565(ILI9341_BLUE);
|
||||
mgos_ili9341_drawRoundRect(0, 0, w->w, w->h, 16);
|
||||
mgos_ili9341_drawDIF(0, 0, w->img);
|
||||
} else if (w->label) {
|
||||
int16_t text_width, text_height;
|
||||
uint16_t x, y;
|
||||
|
Reference in New Issue
Block a user