How to resize SDL_Rect ?

closed account (DEhqDjzh)
Hi, current my player looks like this (blue is object collider green is background):
the collider is 256x256
http://i.hizliresim.com/nlRNa0.jpg


but I want it as:

http://i.hizliresim.com/7Dq1nY.jpg (I am not good at ms paint :P)

I tried to make it 128x128 but it doesn't resize the rectangle only texture gets smaller
Last edited on
Read Lazyfoos tutorials.

I can't see the images (try imgur). And don't use ms paint, use print screen and ctrl v into paint, or use the snipping tool (it comes with windows).

Read the beginners sticky on how to make a proper question. Do you really think you will get a real answer with the lack of information you gave us?

And you realize that SDL_Rect is just a struct with 4 numbers? You change the w or h value and that's how you resize it. I know that you know this, but my point is you have a poor topic name.

Overall my best guess is that you may have more than 1 Rect (which you have not specified). Or you may be improperly using SDL_RenderCopy's parameters (or old SDL's blit). Lazy foo has a basic example which works, its fool proof.
Your image links are broken.
Topic archived. No new replies allowed.