Function SDL_GetRectEnclosingPoints

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

Calculate a minimal rectangle enclosing a set of points.

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

§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.

§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.