SDL_RectEmpty(3)
π SDL_RectEmpty π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_RectEmpty β¨
πΈ NAME πΈ
SDL_RectEmpty β literally just tells you whether a rectangle has no area. that's it. that's the whole job. π
π SYNOPSIS π
#include <SDL3/SDL_rect.h>
SDL_FORCE_INLINE bool SDL_RectEmpty(const SDL_Rect *r);
π¦ DESCRIPTION π¦
so like, a rectangle counts as "empty" for this function if either of these is true:
risNULLπr'swidthand/orheightare<= 0π
that's the vibe check. zero area = empty, no cap.
β οΈ but WAIT, important lore: this is a forced-inline function in a header, NOT a public API function you can find in the SDL library itself. which means the code gets embedded right into the calling program π«Ά and the linker and the dynamic loader will not be able to find this function inside SDL. it's giving "i live in your code now", not "i live in the shared object". iykyk π
π FUNCTION PARAMETERS π
rβ the rectangle to test π
β RETURN VALUE β
returns true if the rectangle is "empty", and false otherwise β¨
π THREAD SAFETY π
it is safe to call this function from any thread. go off, queen, no locking required π
πΈ AVAILABILITY πΈ
this function has been available since SDL 3.2.0 π
and that's the whole page, bestie, you ate it up π
this was brought to you by Simple Directmedia Layer, version SDL 3.4.18, dated SDL_RectEmpty(3) β mwah, stay iconic ππ§β¨
π¦ 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