sdlEncloseFPoints 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 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.22.
extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points, int count, const SDL_FRect * clip, SDL_FRect * result)
Implementation
bool sdlEncloseFPoints(Pointer<SdlFPoint> points, int count,
Pointer<SdlFRect> clip, Pointer<SdlFRect> result) {
final sdlEncloseFPointsLookupFunction = libSdl2.lookupFunction<
Int32 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_EncloseFPoints');
return sdlEncloseFPointsLookupFunction(points, count, clip, result) == 1;
}