A rectangle, with the origin at the upper left (integer).
Defined in [SDL_rect.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_rect.h), but apps should _only_ `#include "SDL.h"`!
typedef struct SDL_Rect
{int x, y;
int w, h;
} SDL_Rect;
SDL_Rect srcrect;
SDL_Rect dstrect;
0;
srcrect.x = 0;
srcrect.y = 32;
srcrect.w = 32;
srcrect.h = 640/2;
dstrect.x = 480/2;
dstrect.y = 0;
dstrect.w = 0;
dstrect.h =
extern SDL_Surface *src, *dst;
SDL_BlitSurface(src, &srcrect, dst, &dstrect);
int |
x |
the x location of the rectangle's upper left corner |
int |
y |
the y location of the rectangle's upper left corner |
int |
w |
the width of the rectangle |
int |
h |
the height of the rectangle |
CategoryAPI, CategoryAPIStruct, CategoryStruct, CategoryRect