101 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
102 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
110 return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
118 return (a && b && (a->x == b->x) && (a->y == b->y) &&
119 (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
Returns true if the two rectangles are equal.
Definition: SDL_rect.h:116
DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect *A, const SDL_Rect *B)
Determine whether two rectangles intersect.
SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
Returns true if point resides inside a rectangle.
Definition: SDL_rect.h:99
DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)
Calculate the union of two rectangles.
struct SDL_FRect SDL_FRect
A rectangle, with the origin at the upper left (floating point).
struct SDL_Rect SDL_Rect
A rectangle, with the origin at the upper left (integer).
struct SDL_Point SDL_Point
The structure that defines a point (integer)
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
Returns true if the rectangle has no area.
Definition: SDL_rect.h:108
DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)
Calculate the intersection of a rectangle and line segment.
struct SDL_FPoint SDL_FPoint
The structure that defines a point (floating point)
DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result)
Calculate a minimal rectangle enclosing a set of points.
DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)
Calculate the intersection of two rectangles.
The structure that defines a point (floating point)
Definition: SDL_rect.h:61
A rectangle, with the origin at the upper left (floating point).
Definition: SDL_rect.h:88
The structure that defines a point (integer)
Definition: SDL_rect.h:49
A rectangle, with the origin at the upper left (integer).
Definition: SDL_rect.h:78