|
#ifndef _ARTCODE_H_
#define _ARTCODE_H_
typedef struct
{
char name[64];
RECT bounds;
COLORREF color;
int polyFillMode;
int count;
POINT* points;
}PolygonEntry;
typedef struct
{
char name[64];
RECT bounds;
COLORREF color;
int polyFillMode;
int count;
POINT* points;
int polyCount;
int* polys;
}PolyPolygonEntry;
typedef struct
{
char name[64];
RECT bounds;
COLORREF color;
int count;
POINT* points;
}PolyLineEntry;
typedef struct
{
TCHAR name[64];
LOGFONT font;
COLORREF bkColor;
DWORD bkMode;
COLORREF textColor;
DWORD textAlign;
POINT pos;
TCHAR text[128];
}TextEntry;
void Draw(CDC* pDC, PolygonEntry& entry, const CRect& clientRect, const CRect& bounds);
BOOL HitTest(PolygonEntry& entry, const CRect& clientRect, const CRect& bounds, const CPoint& point);
void Draw(CDC* pDC, PolyPolygonEntry& entry, const CRect& clientRect, const CRect& bounds);
BOOL HitTest(PolyPolygonEntry& entry, const CRect& clientRect, const CRect& bounds, const CPoint& point);
void Draw(CDC* pDC, PolyLineEntry& entry, const CRect& clientRect, const CRect& bounds);
BOOL HitTest(PolyLineEntry& entry, const CRect& clientRect, const CRect& bounds, const CPoint& point);
void Draw(CDC* pDC, TextEntry& entry, const CRect& clientRect, const CRect& bounds);
BOOL HitTest(TextEntry& entry, const CRect& clientRect, const CRect& bounds, const CPoint& point);
void CreateRegion(CRgn& rgn, PolygonEntry& entry, const CRect& clientRect, const CRect& bounds);
void CreateRegion(CRgn& rgn, PolyPolygonEntry& entry, const CRect& clientRect, const CRect& bounds);
void CreateRegion(CRgn& rgn, PolyLineEntry& entry, const CRect& clientRect, const CRect& bounds);
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I work at Tektronix in Beaverton OR. I've been programming for fun since 1975 (I started while in a Computer Explorer Scout group in Spokane WA). I've been programming in C since 1979 and I've been working professionally since 1983.
I really enjoy www.codeproject.com. It has saved me an incredible amount of time. I only hope my small contributions have given back some of what I've taken.