2020-03-01 09:25:02 +00:00
|
|
|
#ifndef __qwaq_rect_h
|
|
|
|
#define __qwaq_rect_h
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
} Point;
|
|
|
|
|
2020-03-05 06:44:53 +00:00
|
|
|
typedef struct {
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
} Extent;
|
|
|
|
|
|
|
|
typedef struct Rect_s {
|
|
|
|
Point offset;
|
|
|
|
Extent extent;
|
|
|
|
} Rect;
|
|
|
|
|
2020-03-06 04:54:46 +00:00
|
|
|
#ifdef __QFCC__
|
2020-03-01 09:25:02 +00:00
|
|
|
@extern Rect makeRect (int xpos, int ypos, int xlen, int ylen);
|
2020-03-12 17:09:55 +00:00
|
|
|
@extern Point makePoint (int x, int y);
|
|
|
|
@extern Extent makeExtent (int width, int height);
|
2020-03-01 09:25:02 +00:00
|
|
|
//XXX will not work if point or rect point to a local variabl
|
|
|
|
@extern int rectContainsPoint (Rect *rect, Point *point);
|
2020-03-09 17:39:18 +00:00
|
|
|
@extern Rect clipRect (Rect clipRect, Rect rect);
|
2020-03-06 04:54:46 +00:00
|
|
|
#endif
|
2020-03-01 09:25:02 +00:00
|
|
|
|
|
|
|
#endif//__qwaq_rect_h
|