Proper way to scale an SDL Surface without clipping?

前端 未结 3 614
星月不相逢
星月不相逢 2021-01-12 04:51

what is the proper way to scale an SDL Surface? I found one explanation online but it required redrawing the Surface pixel by pixel. It seems like there should be some way o

3条回答
  •  感动是毒
    2021-01-12 05:21

    I know this answer is way too late to assist the person who asked it, but I decided to write this to help anyone who stumbles upon this question. In SDL 2.0 You can use the SDL_BlitScaled() function to scale a surface into a targeted SDL_Rect. There's a tutorial by LazyFoo which describes this, or check out this documentation.

提交回复
热议问题