What LVGL version are you using?
V 6.1.2
What do you want to achieve?
I want to make the canvas background transparent
I want to put an image on the canvas and rotate it
At this time, the background should be transparent
please Help!
Code to reproduce
lv_style_copy(&my_img_style,&lv_style_plain_color);
canvas_measure = lv_canvas_create(scr,NULL);
lv_canvas_set_buffer(canvas_measure,cbuf_measure,CANVAS_WIDTH,CANVAS_HEIGHT,LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED);
lv_obj_set_pos(canvas_measure,130,146);
lv_canvas_draw_img(canvas_measure,100,100,"S:/3_r_right.bin",&my_img_style);
lv_canvas_set_style(canvas_measure,LV_CANVAS_STYLE_MAIN,&my_img_style);
memcpy(cbuf_measure_temp,cbuf_measure,sizeof(cbuf_measure_temp));
lv_img_dsc_t img;
img.data = (void *)cbuf_measure_temp;
img.header.cf = LV_IMG_CF_TRUE_COLOR;
img.header.w = CANVAS_WIDTH;
img.header.h = CANVAS_HEIGHT;
lv_canvas_rotate(canvas_measure,&img,20,0,0,CANVAS_WIDTH/2,CANVAS_HEIGHT/2);