sdl.rect

SDL Rects

Members

Functions

SDL_GetRectAndLineIntersection
bool SDL_GetRectAndLineIntersection(const(SDL_Rect)* rect, int* X1, int* Y1, int* X2, int* Y2)

Calculate the intersection of a rectangle and line segment.

SDL_GetRectAndLineIntersectionFloat
bool SDL_GetRectAndLineIntersectionFloat(const(SDL_FRect)* rect, float* X1, float* Y1, float* X2, float* Y2)

Calculate the intersection of a rectangle and line segment with float precision.

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

Calculate a minimal rectangle enclosing a set of points.

SDL_GetRectEnclosingPointsFloat
bool SDL_GetRectEnclosingPointsFloat(const(SDL_FPoint)* points, int count, const(SDL_FRect)* clip, SDL_FRect* result)

Calculate a minimal rectangle enclosing a set of points with float precision.

SDL_GetRectIntersection
bool SDL_GetRectIntersection(const(SDL_Rect)* A, const(SDL_Rect)* B, SDL_Rect* result)

Calculate the intersection of two rectangles.

SDL_GetRectIntersectionFloat
bool SDL_GetRectIntersectionFloat(const(SDL_FRect)* A, const(SDL_FRect)* B, SDL_FRect* result)

Calculate the intersection of two rectangles with float precision.

SDL_GetRectUnion
bool SDL_GetRectUnion(const(SDL_Rect)* A, const(SDL_Rect)* B, SDL_Rect* result)

Calculate the union of two rectangles.

SDL_GetRectUnionFloat
bool SDL_GetRectUnionFloat(const(SDL_FRect)* A, const(SDL_FRect)* B, SDL_FRect* result)

Calculate the union of two rectangles with float precision.

SDL_HasRectIntersection
bool SDL_HasRectIntersection(const(SDL_Rect)* A, const(SDL_Rect)* B)

Determine whether two rectangles intersect.

SDL_HasRectIntersectionFloat
bool SDL_HasRectIntersectionFloat(const(SDL_FRect)* A, const(SDL_FRect)* B)

Determine whether two rectangles intersect with float precision.

SDL_PointInRect
bool SDL_PointInRect(const(SDL_Point)* p, const(SDL_Rect)* r)

Determine whether a point resides inside a rectangle.

SDL_PointInRectFloat
bool SDL_PointInRectFloat(const(SDL_FPoint)* p, const(SDL_FRect)* r)

Determine whether a point resides inside a floating point rectangle.

SDL_RectEmpty
bool SDL_RectEmpty(const(SDL_Rect)* r)

Determine whether a rectangle has no area.

SDL_RectEmptyFloat
bool SDL_RectEmptyFloat(const(SDL_FRect)* r)

Determine whether a floating point rectangle can contain any point.

SDL_RectToFRect
void SDL_RectToFRect(const(SDL_Rect)* rect, SDL_FRect* frect)

Convert an SDL_Rect to SDL_FRect

SDL_RectsEqual
bool SDL_RectsEqual(const(SDL_Rect)* a, const(SDL_Rect)* b)

Determine whether two rectangles are equal.

SDL_RectsEqualEpsilon
bool SDL_RectsEqualEpsilon(const(SDL_FRect)* a, const(SDL_FRect)* b, const(float) epsilon)

Determine whether two floating point rectangles are equal, within some given epsilon.

SDL_RectsEqualFloat
bool SDL_RectsEqualFloat(const(SDL_FRect)* a, const(SDL_FRect)* b)

Determine whether two floating point rectangles are equal, within a default epsilon.

Structs

SDL_FPoint
struct SDL_FPoint

The structure that defines a point (using floating point values).

SDL_FRect
struct SDL_FRect

A rectangle, with the origin at the upper left (using floating point values).

SDL_Point
struct SDL_Point

The structure that defines a point (using integers).

SDL_Rect
struct SDL_Rect

A rectangle, with the origin at the upper left (using integers).

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen