sdlRenderDrawLine function
Draw a line on the current rendering target.
SDL_RenderDrawLine() draws the line to include both end points. If you want to draw multiple, connecting lines use SDL_RenderDrawLines() instead.
\param renderer the rendering context \param x1 the x coordinate of the start point \param y1 the y coordinate of the start point \param x2 the x coordinate of the end point \param y2 the y coordinate of the end point \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_RenderDrawLines \sa SDL_RenderDrawPoint \sa SDL_RenderDrawPoints \sa SDL_RenderDrawRect \sa SDL_RenderDrawRects \sa SDL_RenderFillRect \sa SDL_RenderFillRects \sa SDL_RenderPresent \sa SDL_SetRenderDrawBlendMode \sa SDL_SetRenderDrawColor
extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
Implementation
int sdlRenderDrawLine(
Pointer<SdlRenderer> renderer, int x1, int y1, int x2, int y2) {
final sdlRenderDrawLineLookupFunction = libSdl2.lookupFunction<
Int32 Function(Pointer<SdlRenderer> renderer, Int32 x1, Int32 y1,
Int32 x2, Int32 y2),
int Function(Pointer<SdlRenderer> renderer, int x1, int y1, int x2,
int y2)>('SDL_RenderDrawLine');
return sdlRenderDrawLineLookupFunction(renderer, x1, y1, x2, y2);
}