sdlGetRectEnclosingPointsFloat function
Calculate a minimal rectangle enclosing a set of points with float precision.
If clip
is not NULL then only points inside of the clipping rectangle are
considered.
\param points an array of SDL_FPoint structures representing points to be
enclosed.
\param count the number of structures in the points
array.
\param clip an SDL_FRect used for clipping or NULL to enclose all points.
\param result an SDL_FRect 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.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result)
Implementation
bool sdlGetRectEnclosingPointsFloat(Pointer<SdlFPoint> points, int count,
Pointer<SdlFRect> clip, Pointer<SdlFRect> result) {
final sdlGetRectEnclosingPointsFloatLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlFPoint> points, Int32 count,
Pointer<SdlFRect> clip, Pointer<SdlFRect> result),
int Function(Pointer<SdlFPoint> points, int count, Pointer<SdlFRect> clip,
Pointer<SdlFRect> result)>('SDL_GetRectEnclosingPointsFloat');
return sdlGetRectEnclosingPointsFloatLookupFunction(
points, count, clip, result) ==
1;
}