00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00029 #ifndef _SDL_rect_h
00030 #define _SDL_rect_h
00031
00032 #include "SDL_stdinc.h"
00033 #include "SDL_error.h"
00034 #include "SDL_pixels.h"
00035 #include "SDL_rwops.h"
00036
00037 #include "begin_code.h"
00038
00039 #ifdef __cplusplus
00040
00041 extern "C" {
00042
00043 #endif
00044
00056 typedef struct SDL_Rect
00057 {
00058 int x, y;
00059 int w, h;
00060 } SDL_Rect;
00061
00067 #define SDL_RectEmpty(X) (((X)->w <= 0) || ((X)->h <= 0))
00068
00074 #define SDL_RectEquals(A, B) (((A)->x == (B)->x) && ((A)->y == (B)->y) && \
00075 ((A)->w == (B)->w) && ((A)->h == (B)->h))
00076
00084 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
00085 const SDL_Rect * B);
00086
00094 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
00095 const SDL_Rect * B,
00096 SDL_Rect * result);
00097
00103 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
00104 const SDL_Rect * B,
00105 SDL_Rect * result);
00106
00114 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
00115 rect, int *X1,
00116 int *Y1, int *X2,
00117 int *Y2);
00118
00119
00120 #ifdef __cplusplus
00121
00122 }
00123
00124 #endif
00125 #include "close_code.h"
00126
00127 #endif
00128
00129