I'm making a heads-up display, similar to what you'd find in a fighter jet (http://i1.ytimg.com/vi/RYjBjT79hLo/hqdefault.jpg).
Some of the elements just stay in one place on the screen, like the airspeed and altitude. That's easy.
The part I'm having trouble with is the pitch ladder (the bars that show 5, 10, 15, etc degrees above/below the horizon) and horizon line. The way I'm trying to implement it is to have a png file that has all the bars from -90 to +90 already created. This file is much much larger in resolution than my display window, so only the bars that correspond to the current pitch, +/-10 degrees, are displayed on the screen. As the user pitches up, the image moves down, and vice versa. As the drift angle increases (the angle between the heading and the velocity vector, ie, sideslip), the HUD moves left or right. The problem is in rotation. I'd like to be able to specify the location of the center point of the image and the rotation angle, not just the top left corner, and have pygame render it appropriately. I'm not quite clear on exactly how rects work though, which is part of the problem.
My math background tells me the easiest way to do this would be to get an array of each pixel value on the screen, then multiply by a transformation matrix based on the pitch and roll, but I don't think pygame actually lets you access that low-level information.
[EDIT] On second thought, a pixel array may not be easiest. A transformation matrix edits the values of each element in the array, but a pixel array contains RGB information in each element. A transformation matrix would just edit the color of each pixel, not actually transform them. hmmmm.... [/EDIT]
It seems like pygame really really wants everything to be boxed up in rectangles that are parallel to the screen borders, which is kind of a problem for a rolling aircraft. I've thought about using OpenGL instead, but that seems overkill. Can anyone help me do this in pygame? Thanks!