blob: bdea087fa6434b895e92b0c44fd69f68d176bf2f [file] [log] [blame]
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001/*
2 * Graphics paths (BeginPath, EndPath etc.)
3 *
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00004 * Copyright 1997, 1998 Martin Boehme
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00005 */
6
7#ifndef __WINE_PATH_H
8#define __WINE_PATH_H
9
Jim Aston2e1cafa1999-03-14 16:35:05 +000010#include "windef.h"
Michael Veksler3fbb8dc1999-02-21 18:23:26 +000011
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000012/* It should not be necessary to access the contents of the GdiPath
13 * structure directly; if you find that the exported functions don't
14 * allow you to do what you want, then please place a new exported
15 * function that does this job in path.c.
16 */
17
18typedef enum tagGdiPathState
19{
20 PATH_Null,
21 PATH_Open,
22 PATH_Closed
23} GdiPathState;
24
25typedef struct tagGdiPath
26{
27 GdiPathState state;
Alexandre Julliarda3960291999-02-26 11:11:13 +000028 POINT *pPoints;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000029 BYTE *pFlags;
30 int numEntriesUsed, numEntriesAllocated;
Alexandre Julliarda3960291999-02-26 11:11:13 +000031 BOOL newStroke;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000032} GdiPath;
33
34#define PATH_IsPathOpen(path) ((path).state==PATH_Open)
35/* Returns TRUE if the specified path is in the open state, i.e. in the
36 * state where points will be added to the path, or FALSE otherwise. This
37 * function is implemented as a macro for performance reasons.
38 */
39
40extern void PATH_InitGdiPath(GdiPath *pPath);
41extern void PATH_DestroyGdiPath(GdiPath *pPath);
Alexandre Julliarda3960291999-02-26 11:11:13 +000042extern BOOL PATH_AssignGdiPath(GdiPath *pPathDest,
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000043 const GdiPath *pPathSrc);
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000044
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000045struct tagDC;
46
47extern BOOL PATH_MoveTo(struct tagDC *dc);
48extern BOOL PATH_LineTo(struct tagDC *dc, INT x, INT y);
49extern BOOL PATH_Rectangle(struct tagDC *dc, INT x1, INT y1,
Alexandre Julliarda3960291999-02-26 11:11:13 +000050 INT x2, INT y2);
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000051extern BOOL PATH_Ellipse(struct tagDC *dc, INT x1, INT y1,
Alexandre Julliarda3960291999-02-26 11:11:13 +000052 INT x2, INT y2);
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000053extern BOOL PATH_Arc(struct tagDC *dc, INT x1, INT y1, INT x2, INT y2,
Mark Dufour704c6752000-11-01 02:12:52 +000054 INT xStart, INT yStart, INT xEnd, INT yEnd, INT lines);
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000055extern BOOL PATH_PolyBezierTo(struct tagDC *dc, const POINT *pt, DWORD cbCount);
56extern BOOL PATH_PolyBezier(struct tagDC *dc, const POINT *pt, DWORD cbCount);
57extern BOOL PATH_PolylineTo(struct tagDC *dc, const POINT *pt, DWORD cbCount);
58extern BOOL PATH_Polyline(struct tagDC *dc, const POINT *pt, DWORD cbCount);
59extern BOOL PATH_Polygon(struct tagDC *dc, const POINT *pt, DWORD cbCount);
60extern BOOL PATH_PolyPolyline(struct tagDC *dc, const POINT *pt, const DWORD *counts,
Huw D M Daviesb8e94b61999-12-20 04:14:48 +000061 DWORD polylines);
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000062extern BOOL PATH_PolyPolygon(struct tagDC *dc, const POINT *pt, const INT *counts,
Huw D M Daviesb8e94b61999-12-20 04:14:48 +000063 UINT polygons);
Mark Dufour704c6752000-11-01 02:12:52 +000064extern BOOL PATH_RoundRect(struct tagDC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width,
65 INT ell_height);
66extern BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags);
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000067#endif /* __WINE_PATH_H */
Huw D M Daviesf0f8da51999-12-05 23:54:02 +000068
69