I need to make a sprite that will be loaded as a bitmap and it can then be moved around and rotated by the user. It will also be drawn with transparent regions.
At the moment I'm doing this by creating a rotated bitmap of the original loaded bitmap and drawing it to the screen every time the sprite is moved. Because It has transparent regions it also has to create a mask bitmap every time it's drawn too - using scanlines to check if each pixel is the transparent colour. This is very slow.
I can't create preloaded bitmaps of each rotation angle because there are too many possible angles.
So has anyone got a good way of doing it. Flash seems to do it very fast. I could load the pixels into an array when the bitmap is loaded, which might speed up the rotation algorithm but then drawing it on the screen would be slow.