mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 16:37:30 +00:00
6a18b1dd55
It's pretty much the union of two rectangles with the same origin.
29 lines
669 B
C
29 lines
669 B
C
#ifndef __qwaq_rect_h
|
|
#define __qwaq_rect_h
|
|
|
|
typedef struct {
|
|
int x;
|
|
int y;
|
|
} Point;
|
|
|
|
typedef struct {
|
|
int width;
|
|
int height;
|
|
} Extent;
|
|
|
|
typedef struct Rect_s {
|
|
Point offset;
|
|
Extent extent;
|
|
} Rect;
|
|
|
|
#ifdef __QFCC__
|
|
@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);
|
|
//XXX will not work if point or rect point to a local variabl
|
|
@extern int rectContainsPoint (Rect *rect, Point *point);
|
|
@extern Rect clipRect (Rect clipRect, Rect rect);
|
|
#endif
|
|
|
|
#endif//__qwaq_rect_h
|