sdlxRenderLine function render

bool sdlxRenderLine(
  1. Pointer<SdlRenderer> renderer,
  2. SdlxFPoint p1,
  3. SdlxFPoint p2
)

Draw a line on the current rendering target at subpixel precision.

\param renderer the renderer which should draw a line. \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 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_RenderLines

extern SDL_DECLSPEC bool SDLCALL SDL_RenderLine(SDL_Renderer *renderer, float x1, float y1, float x2, float y2)

Implementation

bool sdlxRenderLine(
  Pointer<SdlRenderer> renderer,
  SdlxFPoint p1,
  SdlxFPoint p2,
) => sdlRenderLine(renderer, p1.x, p1.y, p2.x, p2.y);