SDL_GetRectE...ngPointsFloat(3)
π SDL_GetRectEnclosingPointsFloat(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_GetRectEnclosingPointsFloat β she's a real one, no cap. π
β¨ NAME β¨
SDL_GetRectEnclosingPointsFloat β calculate a minimal rectangle enclosing a set of points with float precision. literally she draws the tightest little box around your pointies. π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_rect.h>
bool SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result);
π DESCRIPTION π
So here's the tea: if clip is not NULL, then only the points inside of the clipping rectangle get considered. everyone else? not invited to the party. π
π«Ά FUNCTION PARAMETERS π«Ά
pointsβ an array ofSDL_FPointstructures representing the points to be enclosed. your lil squad of coordinates, basically. πcountβ the number of structures in thepointsarray. how many besties are actually showing up. βclipβ anSDL_FRectused for clipping, orNULLto enclose all the points. the VIP velvet rope, or no rope at all. πresultβ anSDL_FRectstructure filled in with the minimal enclosing rectangle. this is where the finished box gets dropped off. π
π₯ RETURN VALUE π₯
Returns true if any points were enclosed, or false if all the points were outside of the clipping rectangle. so like, false = nobody made it past the bouncer. π
π§ THREAD SAFETY π§
It is safe to call this function from any thread. periodt. go off from wherever you want, she doesn't care. β¨
π AVAILABILITY π
This function is available since SDL 3.2.0. so if you're on something olderβ¦ yeah, she's not there yet, sorry babe. π
lowkey important: thatclipcheck is the whole vibe βNULLmeans every point counts, and a real rectangle means only the inside ones do. don't forget it or your box will be giving unexpected energy. π
okay that's the whole page bestie, you ate it up π β this was Simple Directmedia Layer, version SDL 3.4.18, dated with all the love of SDL_GetRectE...ngPointsFloat(3). mwah, go enclose some points, you icon. πππ
π¦ 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