So whats the best way to rotate a component efficiently…
Problem: (turntable effect like serato DJ)
I have a 160 x 160 drawing a couple of eclipses and a rectangular marker off centre which is drawn.
My first attempt was to use affine transform rotate. Which worked but it triggers a redraw on every event frame which eats CPU 6-7% so not great.
My next attempt was to have a second inner component to represent the marker / rectangle which is a lot smaller and use affine rotate on just that element. CPU was still high 5% so I figured the affine rotation is actually creating the max area need and drawing into it…
So the plan is to either use an OpenGL context and let the graphics card do what it does best or change the rectangle to a circle and just update its position in a circular motion as apposed to rotating it.
Anyone else have a more efficient way?