SDL surface and image zooming

Started by
0 comments, last by wyrzy 19 years, 5 months ago
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?
Advertisement
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

This topic is closed to new replies.

Advertisement