2021-04-08 13:07:48 +02:00
|
|
|
#include "../../lv_examples.h"
|
2023-12-13 21:23:08 +01:00
|
|
|
#if LV_USE_IMAGE && LV_BUILD_EXAMPLES
|
2021-02-08 09:53:03 +01:00
|
|
|
|
2023-09-14 20:12:31 +02:00
|
|
|
void lv_example_image_1(void)
|
2021-02-08 09:53:03 +01:00
|
|
|
{
|
2023-09-14 20:12:31 +02:00
|
|
|
LV_IMAGE_DECLARE(img_cogwheel_argb);
|
2023-10-12 20:37:27 +02:00
|
|
|
lv_obj_t * img1 = lv_image_create(lv_screen_active());
|
2023-11-18 15:41:46 +01:00
|
|
|
lv_image_set_src(img1, &img_cogwheel_argb);
|
2023-11-18 15:33:58 +01:00
|
|
|
lv_obj_align(img1, LV_ALIGN_CENTER, 0, 0);
|
|
|
|
lv_image_set_scale_x(img1, 512);
|
|
|
|
lv_image_set_scale_y(img1, 128);
|
|
|
|
lv_image_set_rotation(img1, 10);
|
2023-08-31 22:03:31 +02:00
|
|
|
|
2023-10-12 20:37:27 +02:00
|
|
|
lv_obj_t * img2 = lv_image_create(lv_screen_active());
|
2023-09-14 20:12:31 +02:00
|
|
|
lv_image_set_src(img2, LV_SYMBOL_OK "Accept");
|
2023-08-31 22:03:31 +02:00
|
|
|
lv_obj_align_to(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
|
2023-11-18 15:33:58 +01:00
|
|
|
|
|
|
|
lv_obj_set_style_bg_opa(img1, 100, 0);
|
2021-02-08 09:53:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|