| 1 |
typedef struct |
| 2 |
{ |
| 3 |
int v; |
| 4 |
int h; |
| 5 |
} Point; |
| 6 |
|
| 7 |
typedef struct |
| 8 |
{ |
| 9 |
int top, left, bottom, right; |
| 10 |
} Rect; |
| 11 |
|
| 12 |
int |
| 13 |
x_PtInRect (Point pt, Rect *r) |
| 14 |
{ |
| 15 |
return pt.v >= r->top && pt.v < r->bottom |
| 16 |
&& pt.h >= r->left && pt.h < r->right; |
| 17 |
} |