Description
I would like to create a text gradient for a label widget. There is an example here: Label (lv_label) — LVGL documentation which is exactly what I want, but it does not appear to be correct. See the “What have you tried so far?” section below for details about what is incorrect.
What MCU/Processor/Board and compiler are you using?
I have an STM32U5G9J-DK2 development board with the latest LVGL release (9.1) installed and running. I am able to display graphics properly on the screen.
What LVGL version are you using?
9.1
What do you want to achieve?
I would like to get a functional version of the text gradient working on LVGL 9.1
What have you tried so far?
In the provided code: Label (lv_label) — LVGL documentation, the lv_draw_mask_map_param_t does not seem to exist anymore, despite still being listed in the docs. The closest that I could find is lv_draw_sw_mask_map_param_t. However, I do not know what the “sw” means…
I tried replacing all of the functions that reffered to lv_draw_mask_map_param_t with the equivalent sw ones, however, I discovered that lv_draw_mask_add and lv_draw_mask_remove_id do not have equivalent function in the sw collection (found at lvgl/src/draw/sw).
Additionally, lv_canvas_draw_text appears to be missing from the latest LVGL version and I cannot find an equivalent for drawing text to a canvas object.
How can I rework this example to get a function text gradient in 9.1? Why were these functions removed? And what is the sw mask?