<Da****************@gmail.comwrote in
>
I must rotate bmp using Xlib without change bmp's memory. If someone
knows how I can do this, please help me.
Load the bmp into memory.
I recently posted functions to do this.
Then apply the formula
ax = x - centralx;
ay = y - centraly;
(assuming you wnat to rotate about the centre)
theta is the angle to rotate by
bx = ax * cos(theta) - ay * sin(theta);
by = ax * sin(theta) + ay * cos(theta);
x = bx + centralx;
y = by + centraly;
Work from destination to source, or you will get missing pixel in the
destination image.
(For a very high quality rotate you need to do anti-alising as well).
Then you simply use Xlib to display the new image you have constructed. I'm
pretty sure it has no built-in rotate functions itself.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm