sdlRenderFillRect function

int sdlRenderFillRect(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<SdlRect> rect
)

Fill a rectangle on the current rendering target with the drawing color.

The current drawing color is set by SDL_SetRenderDrawColor(), and the color's alpha value is ignored unless blending is enabled with the appropriate call to SDL_SetRenderDrawBlendMode().

\param renderer the rendering context \param rect the SDL_Rect structure representing the rectangle to fill, or NULL for the entire rendering target \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_RenderDrawLine \sa SDL_RenderDrawLines \sa SDL_RenderDrawPoint \sa SDL_RenderDrawPoints \sa SDL_RenderDrawRect \sa SDL_RenderDrawRects \sa SDL_RenderFillRects \sa SDL_RenderPresent \sa SDL_SetRenderDrawBlendMode \sa SDL_SetRenderDrawColor

extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)

Implementation

int sdlRenderFillRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) {
  final sdlRenderFillRectLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect),
      int Function(Pointer<SdlRenderer> renderer,
          Pointer<SdlRect> rect)>('SDL_RenderFillRect');
  return sdlRenderFillRectLookupFunction(renderer, rect);
}