feat(img): add img.header.stride

see https://github.com/lvgl/lvgl/pull/4414#issuecomment-1698538169
This commit is contained in:
Gabor Kiss-Vamosi
2023-08-31 19:54:30 +02:00
parent a910736cbc
commit c3e2120616
22 changed files with 561 additions and 35 deletions

View File

@@ -71,6 +71,7 @@ void lv_canvas_set_buffer(lv_obj_t * obj, void * buf, lv_coord_t w, lv_coord_t h
canvas->dsc.header.cf = cf;
canvas->dsc.header.w = w;
canvas->dsc.header.h = h;
canvas->dsc.header.stride = 0; /*Let LVGL calculate it automatically*/
canvas->dsc.data = buf;
canvas->dsc.data_size = w * h * lv_color_format_get_size(cf);