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

@@ -20,8 +20,6 @@ void lv_example_arc_1(void)
/*Manually update the label for the first time*/
lv_obj_send_event(arc, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_set_style_opa_layered(arc, LV_OPA_30, LV_PART_MAIN);
}

View File

@@ -4,15 +4,22 @@
void lv_example_img_1(void)
{
LV_IMG_DECLARE(img_cogwheel_argb);
lv_obj_t * img1 = lv_img_create(lv_scr_act());
lv_img_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, LV_ALIGN_CENTER, 0, -20);
lv_obj_set_size(img1, 200, 200);
lv_obj_t * img2 = lv_img_create(lv_scr_act());
lv_img_set_src(img2, LV_SYMBOL_OK "Accept");
lv_obj_align_to(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
LV_IMG_DECLARE(test_img_cogwheel_rgb565a8);
lv_obj_t * cont = lv_obj_create(lv_scr_act());
lv_obj_set_size(cont, 150, LV_SIZE_CONTENT);
lv_obj_set_style_bg_color(cont, lv_palette_main(LV_PALETTE_LIGHT_BLUE), 0);
lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_COLUMN);
lv_obj_t * img = lv_img_create(cont);
lv_img_set_src(img, &test_img_cogwheel_rgb565a8);
lv_obj_set_style_img_recolor(img, lv_palette_main(LV_PALETTE_RED), 0); /*For A8*/
lv_obj_set_style_img_recolor_opa(img, LV_OPA_70, 0);
lv_obj_t * label = lv_label_create(cont);
lv_label_set_text(label, "RGB565");
}
#endif

View File

@@ -7,6 +7,7 @@ void lv_example_spinner_1(void)
lv_obj_t * spinner = lv_spinner_create(lv_scr_act());
lv_obj_set_size(spinner, 100, 100);
lv_obj_center(spinner);
lv_spinner_set_anim_params(spinner, 10000, 200);
}
#endif