i I have such a image，
Now I want to perform a 360 degree rotation，The effect is like this
My approach is to copy multiple objects and then rotate.
But if this method is transplanted to my MCU, it will consume a lot of memory.
So I want to change the scheme, such as not refreshing when the image is rotated.
I don’t want to use the arc control, because its color processing is not flexible, and it can’t achieve the effect I want . For example, a variety of color gradients, so I use the image method.
@kisvegabor might know a trick for it, but I’m not aware of an easy way to inhibit screen refreshes in this manner. It would also start having issues if you put any widgets on top of the fake arc.
I don’t know a trick to solve it. LVGL keeps track of the object and refreshes what’s needed.
There are 3 options I imagine:
- Use a canvas with indexed colors and draw the arcs there.
- Modify the design function of an object and draw the arcs there. For v7 see this post. In v8 it’s much simpler, you just need to add an event to an object and draw what you need in
- In v8 the arc can have a background image from which the arc is masked out. (
arc_img_src style property)