2019-12-09 11:18:24 -07:00
|
|
|
#ifndef __GFXTYPE_H_INCLUDED
|
|
|
|
#define __GFXTYPE_H_INCLUDED
|
|
|
|
|
|
|
|
#include "wintype.h"
|
|
|
|
|
|
|
|
typedef struct tagPOINT {
|
|
|
|
INT32 x;
|
|
|
|
INT32 y;
|
|
|
|
} POINT, *PPOINT;
|
|
|
|
|
|
|
|
typedef struct tagRECT {
|
|
|
|
INT32 left;
|
|
|
|
INT32 top;
|
|
|
|
INT32 right;
|
|
|
|
INT32 bottom;
|
|
|
|
} RECT, *PRECT;
|
|
|
|
|
|
|
|
typedef const POINT *PCPOINT;
|
|
|
|
typedef const RECT *PCRECT;
|
|
|
|
|
2019-12-09 17:02:04 -07:00
|
|
|
typedef UINT32 COLORREF;
|
|
|
|
typedef PUINT32 PCOLORREF;
|
|
|
|
|
2019-12-09 11:18:24 -07:00
|
|
|
extern BOOL G_set_rect(PRECT rect, int left, int top, int right, int bottom);
|
|
|
|
extern BOOL G_set_rect_empty(PRECT rect);
|
|
|
|
extern BOOL G_inflate_rect(PRECT rect, int dx, int dy);
|
|
|
|
extern BOOL G_offset_rect(PRECT rect, int dx, int dy);
|
|
|
|
extern BOOL G_is_rect_empty(PCRECT rect);
|
2019-12-09 17:02:04 -07:00
|
|
|
extern BOOL G_coords_in_rect(PCRECT rect, INT32 x, INT32 y);
|
2019-12-09 11:18:24 -07:00
|
|
|
extern BOOL G_point_in_rect(PCRECT rect, PCPOINT pt);
|
|
|
|
extern BOOL G_rect_equal(PCRECT rect1, PCRECT rect2);
|
|
|
|
extern BOOL G_rect_intersect(PRECT dest, PCRECT src1, PCRECT src2);
|
|
|
|
extern BOOL G_rect_union(PRECT dest, PCRECT src1, PCRECT src2);
|
|
|
|
|
2019-12-09 17:02:04 -07:00
|
|
|
#define RGB(r, g, b) ((((UINT32)(r)) & 0xFF) | ((((UINT32)(g)) & 0xFF) << 8) | ((((UINT32)(b)) & 0xFF) << 16))
|
|
|
|
#define GetRValue(cr) ((UINT32)((cr) & 0xFF))
|
|
|
|
#define GetGValue(cr) ((UINT32)(((cr) >> 8) & 0xFF))
|
|
|
|
#define GetBValue(cr) ((UINT32)(((cr) >> 16) & 0xFF))
|
|
|
|
|
2019-12-09 11:18:24 -07:00
|
|
|
#endif /* __GFXTYPE_H_INCLUDED */
|