Rotating surfaces

Is there a quick and easy way to rotate an SDL_Surface?
I am not talking by 90 degrees, but even increments of 5-10 would be good.

Thanks in advance.

Joe Tennies

PS: If we only had Mode 7 graphics… :wink:

Is there a quick and easy way to rotate an SDL_Surface?
I am not talking by 90 degrees, but even increments of 5-10 would be good.

I believe the SGE library can do it (it’s listed on libsdl.org).
Hope that’s the one I’m thinkig of. :slight_smile:

-bill!

Is there a quick and easy way to rotate an SDL_Surface?
I am not talking by 90 degrees, but even increments of 5-10 would
be good.

Thanks in advance.

I’ve seen it while browsing around a few libs, some based on SDL…

As to 5-10 (degree) increments; you might get away with prerendering,
possibly when loading the graphics. Then you could use interpolation
or other filtering to make it look a lot better.

Joe Tennies

PS: If we only had Mode 7 graphics… :wink:

Well, there is h/w accelerated OpenGL on any serious gaming machine
these days. :slight_smile:

Probably more flexible, actually, and I’ve managed to do things I
never dreamt of doing with normal 2D methods, just by playing around
a little.

Rotation and scaling? Not even considered “tricks”…! Oh, and the
interpolation/filtering is rather inexpensive, even on cards that are
considered “old and useless” these days.

It hardly requires a state-of-the art 64 MB 3D card to do amazing 2D
stuff - the Mach63 Rage Pro does pretty well, despite it’s lack of
filtering on the alpha channel. (It does do alpha blending while
filtering, but doesn’t filter the alpha channel first, as is required
for perfect results.) Still got sub pixel positioning to look pretty
good, even though the card can’t do it right in theory.

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Sunday 18 February 2001 06:54, Joe Tennies wrote:

Joe Tennies wrote:

Is there a quick and easy way to rotate an SDL_Surface?

ImLib by Rasterman has a rotate function, and it’s easier to use than
ImageMagick.

Version 1 is multi-platform:
ftp://ftp.enlightenment.org/enlightenment/enlightenment/libs/
While version 2 is optimised for MMX:
http://www.us.rasterman.com/imlib.html

Marc