Here's what I found on rotating bitmaps in the faq that Gromit quoted above:

=====================================

Subject 3.01: How do I rotate a bitmap?

The easiest way, according to the comp.graphics faq, is to take the rotation transformation and invert it. Then you just iterate over the destination image, apply this inverse transformation and find which source pixel to copy there. A much nicer way comes from the observation that the rotation

matrix:

R(T) = { { cos(T), -sin(T) }, { sin(T), cos(T) } }

is formed my multiplying three matrices, namely:

R(T) = M1(T) * M2(T) * M3(T)

where

M1(T) = { { 1, -tan(T/2) },

{ 0, 1 } }

M2(T) = { { 1, 0 },

{ sin(T), 1 } }

M3(T) = { { 1, -tan(T/2) },

{ 0, 1 } }

Each transformation can be performed in a separate pass, and because these transformations are either row-preserving or column-preserving, anti-aliasing is quite easy.

=====================================

Now, the question is for those who are just learning, is this enough information to "write your own!"? Maybe, but maybe not for some people. I really tire of supposed experts on subjects yelling at newbies and throwing a URL at them telling them to figure it out for themself. Some people are able to take the above and make something out of it. Some people need more help, perhaps a code example doing something similar. If you are an expert and can't be bothered to help teach, don't yell at the students who are looking for such a teacher.

Cya,

Dave