DOKK / manpages / debian 13 / libsdl3-doc / SDL_GetRectEnclosingPoints.3.en
SDL_GetRectEnclosingPoints(3) SDL3 FUNCTIONS SDL_GetRectEnclosingPoints(3)

SDL_GetRectEnclosingPoints - Calculate a minimal rectangle enclosing a set of points.

Defined in SDL3/SDL_rect.h

#include "SDL3/SDL.h"
bool SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result);

If clip is not NULL then only points inside of the clipping rectangle are considered.

an array of SDL_Point
structures representing points to be enclosed.
the number of structures in the points array.
an SDL_Rect
used for clipping or NULL to enclose all points.
an SDL_Rect
structure filled in with the minimal enclosing rectangle.

Returns true if any points were enclosed or false if all the points were outside of the clipping rectangle.

This function is available since SDL 3.2.0.

SDL 3.2.10 Simple Directmedia Layer