|
|
1.1 root 1: /*---------------------------------------------------------------------------*\
2: | POLYBEZIER DEMO HEADER FILE
3: | This is the poly-bezier header file for poly.c. This contains the
4: | definitions and structures for the polybezier demo window. It must be
5: | include in any module who references the polybezier object.
6: |
7: |
8: | created: 31-Oct-90
9: | history: 31-Oct-90 <chriswil> created.
10: |
11: \*---------------------------------------------------------------------------*/
12:
13: #ifdef WIN16
14: #define APIENTRY FAR PASCAL
15: typedef WORD WPARAM;
16: //#else
17: //typedef DWORD WPARAM;
18: #endif
19:
20:
21: #define POLYCLASS "POLYDEMO"
22: #define POLYTITLE "PolyBezier Demo"
23:
24: #define MAX_BEZIER 80
25: #define VELMAX 10
26: #define VELMIN 2
1.1.1.2 ! root 27: #define BEZ_CURVES 1 //Number of Curves in the Bezier
! 28: #define BEZ_PTS 3*BEZ_CURVES+1 //Number of Points is the #Curves * 3 + 1
1.1 root 29:
30:
31: /*
32: ** This structue defines a basic bezier curve. It is intended to be used in
33: ** an array of beziers.
34: */
35: typedef struct _BEZBUFFER
36: {
1.1.1.2 ! root 37: POINT pPts[BEZ_PTS];
1.1 root 38: } BEZBUFFER;
39: typedef BEZBUFFER *PBEZBUFFER;
40: typedef BEZBUFFER NEAR *NPBEZBUFFER;
41: typedef BEZBUFFER FAR *LPBEZBUFFER;
42:
43:
44: /*
45: ** This is the main object for the polybezier window. This structure defines
46: ** a series of bezier curves and the distance between each curve.
47: */
48: typedef struct _POLYDATA
49: {
50: int nBezTotal;
51: int nBezCurr;
52: int nColor;
1.1.1.2 ! root 53: POINT pVel[BEZ_PTS];
1.1 root 54: HANDLE hBezBuffer;
55: } POLYDATA;
56: typedef POLYDATA *PPOLYDATA;
57: typedef POLYDATA NEAR *NPPOLYDATA;
58: typedef POLYDATA FAR *LPPOLYDATA;
59:
60:
61: /*
62: ** POLYBEZIER WINDOW ROUTINES (poly.c)
63: */
64: HWND FAR CreatePolyWindow(HWND,int);
65: LONG APIENTRY PolyProc(HWND,UINT,WPARAM,LONG);
66: BOOL PolyCreateProc(HWND);
67: VOID PolyDestroyProc(HWND);
68: BOOL PolyCommandProc(HWND,WPARAM,LONG);
69: VOID PolyPaintProc(HWND);
70:
71:
72: VOID PolyRedraw(HWND);
73: int PolyNewVel(int);
74: VOID PolyInitPoints(HWND);
75: VOID PolyDrawBez(HWND);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.