can anyone show an alternative to vgClear when it comes to removing drawn objects from the screen? vgClear is great as long as the drawn objects are not rotated about a certain point. As soon as I rotate something the clearing rectangle should also be rotated, but with vgClear that's not the case. I tried using masking and VG_CLEAR_MASK but the docs for masking are not that descriptive and I couldn't get it to work...
What I'm trying to do: I have a circle (let's say with radius 300) and a small rectangle (width 60 height 10) going around the circle. The rectangle changes its position according to some input data. The problem is that the rectangle is rotated about the center of the circle so it moves on the circumference. With every rotation I have to remove the old rectangle and draw a new one, so the idea is to clear the rectangle with a mask rotated be the old angle and draw a new rectangle with a new angle. Since vgClear doesn't rotate the clearing area it keeps clearing only the rectangle at the top, nothing else. I cannot increase the clearing area since this will remove other data from the screen (and redrawing that data will make it blink).
If someone could show an example of removing an object in such a way that the removing rectangle is approximately the size of the object (e.g. surrounding a circle) and can be rotated just like the object with the same rotation that would be great