目次 - SDL 3.0 API(機能別) - 2Dレンダリング - SDL_RenderLine

SDL_RenderLine

レンダーターゲットにサブピクセルの精度の線分を描く

ヘッダ

SDL3/SDL_render.h

構文

bool SDL_RenderLine(SDL_Renderer *renderer, float x1, float y1, float x2, float y2);

引数

SDL_Renderer *rendererレンダリングコンテキスト
floatx1始点のX座標
floaty1始点のY座標
floatx2終点のX座標
floaty2終点のY座標

戻り値

(bool) 成功のとき真, 失敗のとき偽を戻す. SDL_GetError()を呼んで詳細を知ることができる.

スレッドセーフ

この関数を呼べるのはメインスレッドのみである.

バージョン

SDL 3.2.0以降

関連項目

SDL Wikiへのリンク

SDL_RenderLine - SDL Wiki