2020-03-01 09:25:02 +00:00
|
|
|
#ifndef __qwaq_rect_h
|
|
|
|
#define __qwaq_rect_h
|
|
|
|
|
2020-03-23 11:14:32 +00:00
|
|
|
typedef struct Point_s {
|
2020-03-01 09:25:02 +00:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
} Point;
|
|
|
|
|
2020-03-23 11:14:32 +00:00
|
|
|
typedef struct Extent_s {
|
2020-03-05 06:44:53 +00:00
|
|
|
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-26 04:30:33 +00:00
|
|
|
extern Rect makeRect (int xpos, int ypos, int xlen, int ylen);
|
|
|
|
extern Point makePoint (int x, int y);
|
|
|
|
extern Extent makeExtent (int width, int height);
|
|
|
|
extern Extent mergeExtents (Extent a, Extent b);
|
|
|
|
extern int rectContainsPoint (Rect rect, Point point);
|
|
|
|
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
|