sdlRenderRects function render

bool sdlRenderRects(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<SdlFRect> rects,
  3. int count
)

Draw some number of rectangles on the current rendering target at subpixel precision.

\param renderer the renderer which should draw multiple rectangles. \param rects a pointer to an array of destination rectangles. \param count the number of rectangles. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.2.0.

\sa SDL_RenderRect

extern SDL_DECLSPEC bool SDLCALL SDL_RenderRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count)

Implementation

bool sdlRenderRects(
  Pointer<SdlRenderer> renderer,
  Pointer<SdlFRect> rects,
  int count,
) {
  final sdlRenderRectsLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlFRect> rects,
          Int32 count,
        ),
        int Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlFRect> rects,
          int count,
        )
      >('SDL_RenderRects');
  return sdlRenderRectsLookupFunction(renderer, rects, count) == 1;
}