• Advertisement
Sign in to follow this  

SDL - resize image

This topic is 4494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i am using pure sdl for my game and need to scale down an image to pretend that the object is moving away from the player. does anybody know how to do that? thanks

Share this post


Link to post
Share on other sites
Advertisement
there is a SDL_gfx library that handles scaling/rotation.

havent used it myself though.

look at www.libsdl.org under libraries and with the name SDL_gfx

Share this post


Link to post
Share on other sites
SDL_GFX has scaling functions (there is s a dev-pak for it if your using dev-cpp or the new version of code::blocks).

You may want to store the zoomed surface instead of rezooming them every frame. I forget how fast SDL_GFX zooming function is.

Note the above link seems to be new, neither libSdl.org nor the great oracle google link to it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement