AW: Re: Rotate

why don’t you create a second SDL_Surface where dest.w = source.h and dest.h = source.w and do something like this:

for (i = 0; i < source.h * 3; i++)
for (a=0; a < source.w * 3; i++)
{
dest[a * dest.w + i] = source [i * souce.w + a];
}

*3 because of the RGB-Format - or whatever you use…> Von: Bill Kendrick

An: “A list for developers using the SDL library. (includes SDL-announce)”
Betreff: Re: [SDL] Rotate
Datum: Tue, 24 May 2005 01:22:13 -0700

On Mon, May 23, 2005 at 03:22:32PM +0000, Leszek Kula wrote:

Hi!

I’ve got a simple program, which display bmp&jpg files and writte some text
usung (SDL,SDL_image,SDL_ttf). Now I need to turn left orientation of my
display. Is there any simple method to do it ?

SDL has no way of doing this internally. You could write your own code
to do this, using various methods of transforming an image 90 degrees,
or you could use a library, such as SDL_rotozoom or SDL_gfx or whatever it
is out there that does these kinds of things? :^)

(See the www.libsdl.org “Libraries” page to find something.)

Good luck!


-bill!
bill at newbreedsoftware.com
http://newbreedsoftware.com/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Benachrichtigung bei E-Mail Empfang! - http://mail.lycos.de/app/lycosinside/setupLI.exe