http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Information Outlet



In a message dated 3/12/00 8:16:12 PM Central Standard Time, 
anime6@earthlink.net writes:

<< I need to find a good explaination on how to rotate bitmaps.  I was 
thinking
 of an algorithm.  Maybe take each line of the bitmap, rasterize it using the
 "Best Line" algorithm, and then draw each line like a line with each pixel
 being a pixel from that line (stored in a stack or a queue).  The only
 things wrong with this is:
 A)It's slow.
 B)There would be empty spaces.
  >>

Do it backwards - don't rotate the bitmap and store it. Rather, start at the 
end bitmap, go through it pixel by pixel. For each pixel in the new bitmap, 
find a corresponding pixel in the original (or if there's no pixel, indicate 
it). This gets rid of the empty spaces and it can be optimized quite a bit. 
I'll be making some how-tos about this pretty soon. 
-Ender Wiggin
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html