sdlGetClipRect function

void sdlGetClipRect(
  1. Pointer<SdlSurface> surface,
  2. Pointer<SdlRect> rect
)

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.

\param surface the SDL_Surface structure representing the surface to be clipped \param rect an SDL_Rect structure filled in with the clipping rectangle for the surface

\since This function is available since SDL 2.0.0.

\sa SDL_BlitSurface \sa SDL_SetClipRect

extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect)

Implementation

void sdlGetClipRect(Pointer<SdlSurface> surface, Pointer<SdlRect> rect) {
  final sdlGetClipRectLookupFunction = libSdl2.lookupFunction<
      Void Function(Pointer<SdlSurface> surface, Pointer<SdlRect> rect),
      void Function(Pointer<SdlSurface> surface,
          Pointer<SdlRect> rect)>('SDL_GetClipRect');
  return sdlGetClipRectLookupFunction(surface, rect);
}