###### (This is the legacy documentation for SDL2, the previous stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current stable version.) # SDL_Rect A rectangle, with the origin at the upper left (integer). ## Header File Defined in [SDL_rect.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_rect.h) ## Syntax ```c typedef struct SDL_Rect { int x, y; int w, h; } SDL_Rect; ``` ## See Also - [SDL_RectEmpty](SDL_RectEmpty) - [SDL_RectEquals](SDL_RectEquals) - [SDL_HasIntersection](SDL_HasIntersection) - [SDL_IntersectRect](SDL_IntersectRect) - [SDL_IntersectRectAndLine](SDL_IntersectRectAndLine) - [SDL_UnionRect](SDL_UnionRect) - [SDL_EnclosePoints](SDL_EnclosePoints) ---- [CategoryAPI](CategoryAPI), [CategoryAPIStruct](CategoryAPIStruct), [CategoryRect](CategoryRect)