logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10                      SDL_GetRectEnclosingPoints(3)

Description

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

Function Parameters

points an array of SDL_Point
               structures representing points to be enclosed.

       count  the number of structures in the points array.

       clip   an SDL_Rect
               used for clipping or NULL to enclose all points.

       result an SDL_Rect
               structure filled in with the minimal enclosing rectangle.

Header File

       Defined in SDL3/SDL_rect.h

Name

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

Return Value

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

Synopsis

#include"SDL3/SDL.h"boolSDL_GetRectEnclosingPoints(constSDL_Point*points,intcount,constSDL_Rect*clip,SDL_Rect*result);

See Also