Function SDL_GetRectEnclosingPointsFloat

pub unsafe extern "C" fn SDL_GetRectEnclosingPointsFloat(
    points: *const SDL_FPoint,
    count: i32,
    clip: *const SDL_FRect,
    result: *mut SDL_FRect,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

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.

§Parameters

  • points: an array of SDL_FPoint structures representing points to be enclosed.
  • count: the number of structures in the points array.
  • clip: an SDL_FRect used for clipping or NULL to enclose all points.
  • result: an SDL_FRect structure filled in with the minimal enclosing rectangle.

§Return value

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

§Availability

This function is available since SDL 3.2.0.