SDL_BlitSurfaceScaled(3)
π SDL_BlitSurfaceScaled π
okay bestie, welcome to the manual page for SDL_BlitSurfaceScaled(3) β that's the SDL3 function page, and it's genuinely one of the good ones. β¨
πΈ NAME πΈ
SDL_BlitSurfaceScaled β perform a scaled blit to a destination surface, which may be of a different format. no cap, it does the copying and the resizing at the same time. main character energy fr. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_surface.h>
bool SDL_BlitSurfaceScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
look at that signature, she's giving five whole arguments and every single one matters. π«Ά
π FUNCTION PARAMETERS π
srcβ theSDL_Surfacestructure to be copied from. this is the source, the origin, the place we're stealing pixels from. πsrcrectβ theSDL_Rectstructure representing the rectangle to be copied, orNULLto copy the entire surface. passNULLand she takes everything, no crumbs left. πdstβ theSDL_Surfacestructure that is the blit target. this is where the pixels are going, bestie. that's the destination. π―dstrectβ theSDL_Rectstructure representing the target rectangle in the destination surface, orNULLto fill the entire destination surface. yup,NULLhere means "cover the whole thing". πscaleModeβ theSDL_ScaleModeto be used. yes it's literally about how the scaling happens. iconic. π¦
π RETURN VALUE π
Returns true on success or false on failure β and if it's false, call SDL_GetError() for more information. do NOT just sit there wondering, the error string is right there, go read it. π
π§ THREAD SAFETY π§
Only one thread should be using the src and dst surfaces at any given time. one. thread. at. a. time. this is not a vibe where you share. π
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something older, that's a you problem, go update. π
π SEE ALSO π
SDL_BlitSurface(3)β the non-scaled sibling. same energy, no resizing. go say hi. π
and that's the whole page, bestie, you ate it. this was SDL_BlitSurfaceScaled(3) from Simple Directmedia Layer, SDL 3.4.18 β mwah, go blit something pretty. πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms