sdlEnclosePoints function
Calculate a minimal rectangle enclosing a set of points.
If clip
is not NULL then only points inside of the clipping rectangle are
considered.
\param points an array of SDL_Point structures representing points to be
enclosed
\param count the number of structures in the points
array
\param clip an SDL_Rect used for clipping or NULL to enclose all points
\param result an SDL_Rect structure filled in with the minimal enclosing
rectangle
\returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
points were outside of the clipping rectangle.
\since This function is available since SDL 2.0.0.
extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip, SDL_Rect * result)
Implementation
bool sdlEnclosePoints(Pointer<SdlPoint> points, int count,
Pointer<SdlRect> clip, Pointer<SdlRect> result) {
final sdlEnclosePointsLookupFunction = libSdl2.lookupFunction<
Int32 Function(Pointer<SdlPoint> points, Int32 count,
Pointer<SdlRect> clip, Pointer<SdlRect> result),
int Function(Pointer<SdlPoint> points, int count, Pointer<SdlRect> clip,
Pointer<SdlRect> result)>('SDL_EnclosePoints');
return sdlEnclosePointsLookupFunction(points, count, clip, result) == 1;
}