sdlRenderLines function

bool sdlRenderLines(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<SdlFPoint> points,
  3. int count
)

Draw a series of connected lines on the current rendering target at subpixel precision.

\param renderer the renderer which should draw multiple lines. \param points the points along the lines. \param count the number of points, drawing count-1 lines. \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.1.3.

\sa SDL_RenderLine

extern SDL_DECLSPEC bool SDLCALL SDL_RenderLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count)

Implementation

bool sdlRenderLines(
    Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points, int count) {
  final sdlRenderLinesLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points,
          Int32 count),
      int Function(Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points,
          int count)>('SDL_RenderLines');
  return sdlRenderLinesLookupFunction(renderer, points, count) == 1;
}