LVGL coordinates


I tried to represent how LVGL use the LV_HOR_RES_MAX and LV_VER_RES_MAX parameters when handling coordinates. Is the following image accurate?

The gray rectangle represents the “drawing area/screen”, at the top left we have the coordinate 0,0, the x axis grows until LV_HOR_RES_MAX and the y axis grows until LV_VER_RES_MAX.


Yes, it works like this.

I think it’s the most common coordinate system for UI, so LVGL also uses this.

1 Like