[LVGL 9] How to clip the drawing function?


I’m using LVGL canvas to draw my custom image, I want to set clipping for the drawing function.
I saw the LVGL mask function maybe the solution for me, but I can’t find any example to use it in LVGL 9.0

What MCU/Processor/Board and compiler are you using?

PC Simulator

What LVGL version are you using?


What do you want to achieve?

Clipping the draw function. For example, set up a rect as the clip area, and then draw the circle, only the pixels in the clipping area will be displayed.