Sign in to follow this  
moucard

SDL surface and image zooming

Recommended Posts

Hi to everyone. I'm just learning SDL which looks good and simple. I want to make an application where I load an image on screen. Can I zoom in/out of the image (make it bigger smaller) with SDL_Surface or something similar, or do I have to use OpenGL for that?

Share this post


Link to post
Share on other sites
Try SDL_gfx (click)

The function you want is:
SDL_Surface * rotozoomSurface (SDL_Surface *src, double angle, double zoom, int smooth);
//Takes an ptr to an SDL_Surface, angle to rotate(0-360), a zoom factor(1.0 == regular size), and a smooth(1==antialiased, 0=not antialiased)
// returns a ptr to the newly scaled/rotated SDL_Surface

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this