SDL_BLITSURFACEUNCHECKEDSCALED(3)

πŸ’– SDL_BlitSurfaceUncheckedScaled πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today we're getting into the low-level stuff. like, the backstage-pass, no-security-guard, you-better-know-what-you're-doing stuff. πŸŽ€


✨ NAME ✨

SDL_BlitSurfaceUncheckedScaled β€” Perform low-level surface scaled blitting only.

like, ONLY. it does one thing. it does it well. main character behavior fr. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_surface.h>

bool SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);

look at her. five arguments. no notes. 😌


✨ DESCRIPTION ✨

so here's the tea: this is a semi-private function 🫣 and it performs low-level surface blitting, assuming the input rectangles have already been clipped.

that "assuming" is doing a LOT of heavy lifting, bestie. it means you already did the clipping. it's not gonna double-check you. it's not gonna hold your hand. it's just gonna blit. no cap. πŸ”₯


✨ FUNCTION PARAMETERS ✨

  • src β€” the SDL_Surface structure to be copied from. this is the source, the origin, the place we're stealing pixels from πŸ’–
  • srcrect β€” the SDL_Rect structure representing the rectangle to be copied, may not be NULL. like seriously, do not pass NULL. it's giving crash energy πŸ’€
  • dst β€” the SDL_Surface structure that is the blit target. the destination. where the pixels are going to live their new life ✨
  • dstrect β€” the SDL_Rect structure representing the target rectangle in the destination surface, may not be NULL. same rule, same drama πŸ™ˆ
  • scaleMode β€” the SDL_ScaleMode to be used. this is the vibe of the scaling, iykyk 🌸

✨ RETURN VALUE ✨

returns true on success or false on failure πŸ₯² and if it fails you gotta call SDL_GetError() for more information. she will tell you what went wrong, bestie. just ask her. 🫢


✨ THREAD SAFETY ✨

⚠️ Only one thread should be using the src and dst surfaces at any given time.

one thread. ONE. this is not a group project, this is a solo mission. sharing is not caring here, it's a race condition 🚨😭


✨ AVAILABILITY ✨

this function is available since SDL 3.2.0 ⭐ so if you're on something older... girl. upgrade. πŸ’…


✨ SEE ALSO ✨

  • SDL_BlitSurfaceScaled(3) β€” the one that actually checks stuff for you πŸ‘‘ go read that one too, she's the responsible sister

mwah πŸ’‹ that's the whole page! this iconic lil entry came to you from Simple Directmedia Layer, SDL 3.4.18, and honestly she ate. go blit something gorgeous, bestie. πŸ¦‹πŸŒˆπŸ’œ

πŸ“¦ where this page comes from