From f58dcd94fca868ca05902bf9bd3338b8e8df8d83 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 10 Aug 2022 08:00:14 -0400 Subject: [PATCH] docs(disp): LV_COLOR_SCREEN_TRANSP remove dependency on LV_COLOR_DEPTH_32 as transparency is supported across all color depths (#3556) * Kconfig - LV_COLOR_SCREEN_TRANSP remove dependency on LV_COLOR_DEPTH_32 as transparency is supported across all color depths * display.md - LV_COLOR_SCREEN_TRANSP remove mention of 32bpp requirement that is no longer necessary --- Kconfig | 4 +--- docs/overview/display.md | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index 76e86c597..894046410 100644 --- a/Kconfig +++ b/Kconfig @@ -42,11 +42,9 @@ menu "LVGL configuration" config LV_COLOR_SCREEN_TRANSP bool "Enable more complex drawing routines to manage screens transparency." - depends on LV_COLOR_DEPTH_32 help Can be used if the UI is above another layer, e.g. an OSD menu or video player. - Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to - non LV_OPA_COVER value + The screen's `bg_opa` should be set to non LV_OPA_COVER value config LV_COLOR_MIX_ROUND_OFS int "Adjust color mix functions rounding" diff --git a/docs/overview/display.md b/docs/overview/display.md index 66f84620e..b756b77ea 100644 --- a/docs/overview/display.md +++ b/docs/overview/display.md @@ -63,11 +63,10 @@ See the [Display background](#display-background) section for more details. If t This configuration (transparent screen and display) could be used to create for example OSD menus where a video is played on a lower layer, and a menu is overlayed on an upper layer. To handle transparent displays, special (slower) color mixing algorithms need to be used by LVGL so this feature needs to enabled with `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`. -As this mode operates on the Alpha channel of the pixels `LV_COLOR_DEPTH = 32` is also required. The Alpha channel of 32-bit colors will be 0 where there are no objects and 255 where there are solid objects. +The Alpha channel of 32-bit colors will be 0 where there are no objects and 255 where there are solid objects. In summary, to enable transparent screens and displays for OSD menu-like UIs: - Enable `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h` -- Be sure to use `LV_COLOR_DEPTH 32` - Set the screen's opacity to `LV_OPA_TRANSP` e.g. with `lv_obj_set_style_local_bg_opa(lv_scr_act(), LV_OBJMASK_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP)` - Set the display opacity to `LV_OPA_TRANSP` with `lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);`