Adding rectangle objects

Is there any reason I’m missing not to add an object that can draw rectangles?

It is a super thin object that just uses lv_draw_rect() The advantage over lv_line is that you can draw filled rectangles, rounded rectangles and circles by changing the body.opa & body.radius. Also graduated coloring.

I feel it is too easy and perhaps I could be using lv_draw_rect() directly or there is some other method.

Use lv_obj_create(...) and set style for drawing high-level rectangular.

1 Like

Thank you. Works well.