Function SDL_GetSurfaceClipRect

pub unsafe extern "C" fn SDL_GetSurfaceClipRect(
    surface: *mut SDL_Surface,
    rect: *mut SDL_Rect,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Get the clipping rectangle for a surface.

When surface is the destination of a blit, only the area within the clip rectangle is drawn into.

§Parameters

  • surface: the SDL_Surface structure representing the surface to be clipped.
  • rect: an SDL_Rect structure filled in with the clipping rectangle for the surface.

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Availability

This function is available since SDL 3.2.0.

§See also