The translucency effect of the control does not take effect

I used RGBA’s color display mode and found that after I set the lines to translucent, the video layer behind the lines did not show up. I tried a lot of methods but still did not meet the usage requirements. Here is my code

lv_obj_set_style_bg_opa(lv_scr_act(),LV_OPA_0, LV_PART_MAIN);
lv_obj_t *window = lv_obj_create(lv_scr_act());
lv_obj_set_style_bg_opa(window,LV_OPA_0, LV_PART_MAIN);
lv_obj_add_flag(window, LV_OBJ_FLAG_FLOATING);
lv_obj_set_size(window, 800, 1000); // 设置窗口对象的大小
lv_obj_set_style_bg_color(window, lv_color_darken(color, LV_OPA_40), LV_PART_INDICATOR);

		lv_obj_align(window, LV_ALIGN_CENTER, 0, 0);  // 将窗口对象居中对齐

        static lv_style_t style;

        lv_style_set_line_color(&style, color);	//设置颜色
        lv_style_set_line_width(&style, 100);								//设置宽度
        lv_style_set_line_opa(&style ,LV_OPA_50);							//设置透明度

        lv_style_set_line_rounded(&style, false);							//设置是否圆角
    /*Create an object with the new style*/
        lv_obj_t * obj = lv_line_create(lv_scr_act());

        lv_obj_add_style(obj, &style, 0);

        static lv_point_t p[] = {{0, 100}, {0, 1000}};
        lv_line_set_points(obj, p, 2);										//2个点,绘制线


        static lv_style_t style1;

	        lv_style_set_line_color(&style1, color);	//设置颜色
	        lv_style_set_line_width(&style1, 100);								//设置宽度
	        lv_style_set_line_opa(&style1 ,LV_OPA_40);

	        lv_style_set_opa(&style1 ,LV_OPA_40);

	        lv_style_set_line_rounded(&style1, false);							//设置是否圆角
	    /*Create an object with the new style*/
	        lv_obj_t * obj1 = lv_line_create(lv_scr_act());
	        lv_obj_add_style(obj1, &style1, 0);
	        static lv_point_t p1[] = {{180, 100}, {180, 1000}};
	        lv_line_set_points(obj1, p1, 2);										//2个点,绘制线

The effect of this code is as follows:Set up 2 lines on the screen, set different transparency, and set the transparency of the main canvas to 0, so that the following video layer can be displayed, but I drew the line set % 50% transparency, but he will still block the following video to me, ask the big guy can help me, thank you very much。

Version 8.3.7 of LVGL is used
lvgl gets the actual renderings, he is not translucent

I want the renderings


Do you want to use the entire layer above the video display with transparency? It is possible to set the whole “screen” (that is, the LVGL application) to transparent. See the “transparent screens” section here: Displays — LVGL documentation . Otherwise I am not so sure- I do not really understand the styles myself too well.

First of all, thank you very much! Yes, I set it according to the documentation, but there is no effect, he can’t set the translucent effect

My tip you add style to line dont remove defaults …
Try Styles — LVGL documentation

or lvgl dont have info about video pixels and cant calc… this modes is ok for hw based two layer for example as stm LTDC.

Displays — LVGL documentation
Imporant: To properly render the screen the display’s color format needs to be set to one with alpha channel.