Added function table to GDI objects for better encapsulation.
[wine.git] / include / path.h
blob944121e6ecd8cc8eee6564e1e218929499e66e87
1 /*
2 * Graphics paths (BeginPath, EndPath etc.)
4 * Copyright 1997, 1998 Martin Boehme
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_PATH_H
22 #define __WINE_PATH_H
24 #include "windef.h"
26 /* It should not be necessary to access the contents of the GdiPath
27 * structure directly; if you find that the exported functions don't
28 * allow you to do what you want, then please place a new exported
29 * function that does this job in path.c.
32 typedef enum tagGdiPathState
34 PATH_Null,
35 PATH_Open,
36 PATH_Closed
37 } GdiPathState;
39 typedef struct tagGdiPath
41 GdiPathState state;
42 POINT *pPoints;
43 BYTE *pFlags;
44 int numEntriesUsed, numEntriesAllocated;
45 BOOL newStroke;
46 } GdiPath;
48 #define PATH_IsPathOpen(path) ((path).state==PATH_Open)
49 /* Returns TRUE if the specified path is in the open state, i.e. in the
50 * state where points will be added to the path, or FALSE otherwise. This
51 * function is implemented as a macro for performance reasons.
54 extern void PATH_InitGdiPath(GdiPath *pPath);
55 extern void PATH_DestroyGdiPath(GdiPath *pPath);
56 extern BOOL PATH_AssignGdiPath(GdiPath *pPathDest,
57 const GdiPath *pPathSrc);
59 struct tagDC;
61 extern BOOL PATH_MoveTo(struct tagDC *dc);
62 extern BOOL PATH_LineTo(struct tagDC *dc, INT x, INT y);
63 extern BOOL PATH_Rectangle(struct tagDC *dc, INT x1, INT y1,
64 INT x2, INT y2);
65 extern BOOL PATH_Ellipse(struct tagDC *dc, INT x1, INT y1,
66 INT x2, INT y2);
67 extern BOOL PATH_Arc(struct tagDC *dc, INT x1, INT y1, INT x2, INT y2,
68 INT xStart, INT yStart, INT xEnd, INT yEnd, INT lines);
69 extern BOOL PATH_PolyBezierTo(struct tagDC *dc, const POINT *pt, DWORD cbCount);
70 extern BOOL PATH_PolyBezier(struct tagDC *dc, const POINT *pt, DWORD cbCount);
71 extern BOOL PATH_PolylineTo(struct tagDC *dc, const POINT *pt, DWORD cbCount);
72 extern BOOL PATH_Polyline(struct tagDC *dc, const POINT *pt, DWORD cbCount);
73 extern BOOL PATH_Polygon(struct tagDC *dc, const POINT *pt, DWORD cbCount);
74 extern BOOL PATH_PolyPolyline(struct tagDC *dc, const POINT *pt, const DWORD *counts,
75 DWORD polylines);
76 extern BOOL PATH_PolyPolygon(struct tagDC *dc, const POINT *pt, const INT *counts,
77 UINT polygons);
78 extern BOOL PATH_RoundRect(struct tagDC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width,
79 INT ell_height);
80 extern BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags);
81 #endif /* __WINE_PATH_H */