目次 - SDL 3.0 API(機能別) - 領域 - SDL_GetRectEnclosingPoints

SDL_GetRectEnclosingPoints

全ての点を含む最小の長方形を求める

ヘッダ

SDL3/SDL_rect.h

構文

bool SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result);

引数

const SDL_Point *points点の配列
intcountpoints点の数
const SDL_Rect *clipクリップ枠, NULLのとき全ての点を対象とする
SDL_Rect *result最小の長方形の書き込み先へのポインタ

戻り値

(bool) 領域内に点があるとき真, 全ての点がクリップ枠の外側にあるとき偽を戻す.

詳細

clipがNULLでない場合, クリップ枠の内側の点のみが対象となる.

スレッドセーフ

この関数はどのスレッドからも安全に呼べる.

バージョン

SDL 3.2.0以降

SDL Wikiへのリンク

SDL_GetRectEnclosingPoints - SDL Wiki