ReactOS  0.4.14-dev-77-gd9e7c48
path.h
Go to the documentation of this file.
1 #pragma once
2 
3 /* DCPATH flPath */
5 {
6  DCPATH_ACTIVE = 0x0001,
7  DCPATH_SAVE = 0x0002,
8  DCPATH_CLOCKWISE = 0x0004,
9 
10  /* ReactOS only */
11  DCPATH_SAVESTATE = 0x80000000
12 };
13 
14 typedef HGDIOBJ HPATH, *PHPATH;
15 
16 typedef enum tagGdiPathState
17 {
21 } GdiPathState;
22 
23 // Path type flags
24 #define PATHTYPE_KEEPME 1
25 #define PATHTYPE_STACK 2
26 
27 /* extended PATHDATA */
28 typedef struct _EXTPATHDATA
29 {
33 
34 typedef struct _PATH
35 {
37  //PVOID ppachain;
43  FLONG flags; // PATHDATA flags.
45  // PATHOBJ;
46  FLONG fl; // Saved flags.
47  ULONG cCurves; // Saved number of lines and Bezier.
48 
49  struct _EPATHOBJ *epo;
50 
51  // Wine/ReactOS Things to convert from:
59 } PATH, *PPATH;
60 
61 typedef struct _EPATHOBJ
62 {
67 
68 #define PATH_AllocPath() ((PPATH) GDIOBJ_AllocObj(GDIObjType_PATH_TYPE))
69 #define PATH_AllocPathWithHandle() ((PPATH) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_PATH, sizeof(PATH)))
70 #define PATH_LockPath(hPath) ((PPATH)GDIOBJ_ShareLockObj((HGDIOBJ)hPath, GDI_OBJECT_TYPE_PATH))
71 #define PATH_UnlockPath(pPath) GDIOBJ_vDereferenceObject((POBJ)pPath)
72 
73 
74 #define PATH_IsPathOpen(dclevel) ( ((dclevel).hPath) && ((dclevel).flPath & DCPATH_ACTIVE) )
75 
76 BOOL FASTCALL PATH_Arc (PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd, INT direction, INT lines);
80 BOOL FASTCALL PATH_PolyBezier (PDC dc, const POINT *pts, DWORD cbPoints);
81 BOOL FASTCALL PATH_PolyBezierTo (PDC dc, const POINT *pts, DWORD cbPoints);
82 BOOL FASTCALL PATH_PolyDraw(PDC dc, const POINT *pts, const BYTE *types, DWORD cbPoints);
83 BOOL FASTCALL PATH_PolylineTo (PDC dc, const POINT *pts, DWORD cbPoints);
84 BOOL FASTCALL PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons);
85 BOOL FASTCALL PATH_PolyPolyline( PDC dc, const POINT* pts, const DWORD* counts, DWORD polylines);
87 BOOL FASTCALL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height);
88 BOOL FASTCALL PATH_PathToRegion (PPATH pPath, INT nPolyFillMode, PREGION Rgn);
90 
91 BOOL FASTCALL PATH_AddEntry (PPATH pPath, const POINT *pPoint, BYTE flags);
93 BOOL FASTCALL PATH_DoArcPart (PPATH pPath, FLOAT_POINT corners[], double angleStart, double angleEnd, BYTE startEntryType);
95 BOOL FASTCALL PATH_FillPathEx(PDC dc, PPATH pPath, PBRUSH pbrFill);
97 VOID FASTCALL PATH_NormalizePoint (FLOAT_POINT corners[], const FLOAT_POINT *pPoint, double *pX, double *pY);
98 
99 BOOL FASTCALL PATH_ReserveEntries (PPATH pPath, INT numEntries);
100 VOID FASTCALL PATH_ScaleNormalizedPoint (FLOAT_POINT corners[], double x, double y, POINT *pPoint);
102 BOOL PATH_CheckCorners(DC *dc, POINT corners[], INT x1, INT y1, INT x2, INT y2);
103 
106 
108 
109 BOOL PATH_RestorePath( DC *, DC *);
110 BOOL PATH_SavePath( DC *, DC *);
111 BOOL IntGdiFillRgn(PDC pdc, PREGION prgn, PBRUSH pbrFill);
113 IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit);
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3706
int numEntriesAllocated
Definition: path.h:56
BOOL FASTCALL PATH_PolyPolygon(PDC dc, const POINT *pts, const INT *counts, UINT polygons)
Definition: path.c:1240
PEXTPATHDATA ppdLast
Definition: path.h:42
PEXTPATHDATA ppdCurrent
Definition: path.h:44
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4366
CLIPOBJ * pco
Definition: path.h:65
BOOL FASTCALL PATH_ReserveEntries(PPATH pPath, INT numEntries)
Definition: path.c:297
BOOL FASTCALL PATH_PolyPolyline(PDC dc, const POINT *pts, const DWORD *counts, DWORD polylines)
Definition: path.c:1290
BOOL FASTCALL PATH_AddFlatBezier(PPATH pPath, POINT *pt, BOOL closed)
Definition: path.c:1330
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
tagGdiPathState
Definition: path.h:16
PPATH FASTCALL IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit)
Definition: path.c:1724
BOOL FASTCALL PATH_Delete(HPATH hPath)
Definition: path.c:91
#define pt(x, y)
Definition: drawing.c:79
FLONG flags
Definition: path.h:43
Definition: path.h:61
GLuint GLuint GLsizei count
Definition: gl.h:1545
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
VOID FASTCALL PATH_NormalizePoint(FLOAT_POINT corners[], const FLOAT_POINT *pPoint, double *pX, double *pY)
Definition: path.c:384
BOOL IntGdiFillRgn(PDC pdc, PREGION prgn, PBRUSH pbrFill)
Definition: path.h:34
FLONG flType
Definition: path.h:40
ULONG cCurves
Definition: path.h:47
BOOL FASTCALL PATH_Rectangle(PDC dc, INT x1, INT y1, INT x2, INT y2)
Definition: path.c:614
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC dc
Definition: cylfrac.c:34
BOOL PATH_SavePath(DC *, DC *)
Definition: path.c:188
struct _EXTPATHDATA EXTPATHDATA
struct _PATH * PPATH
BOOL FASTCALL PATH_PathToRegion(PPATH pPath, INT nPolyFillMode, PREGION Rgn)
Definition: path.c:1403
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
VOID FASTCALL IntGetCurrentPositionEx(PDC dc, LPPOINT pt)
Definition: line.c:128
BOOL FASTCALL PATH_LineTo(PDC dc, INT x, INT y)
Definition: path.c:570
PPATH FASTCALL PATH_FlattenPath(PPATH pPath)
Definition: path.c:1359
BOOL FASTCALL PATH_PolyDraw(PDC dc, const POINT *pts, const BYTE *types, DWORD cbPoints)
Definition: path.c:1132
BOOL PATH_CheckCorners(DC *dc, POINT corners[], INT x1, INT y1, INT x2, INT y2)
Definition: path.c:404
PATHOBJ po
Definition: path.h:63
_DCPATHFLAGS
Definition: path.h:4
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: path.h:18
struct _EXTPATHDATA * PEXTPATHDATA
const WCHAR * str
POINT * pPoints
Definition: path.h:53
BOOL FASTCALL PATH_FillPath(PDC dc, PPATH pPath)
Definition: path.c:1458
PPATH pPath
Definition: path.h:64
Definition: region.h:7
int numEntriesUsed
Definition: path.h:55
unsigned long FLONG
Definition: ntbasedef.h:373
BYTE * pFlags
Definition: path.h:54
Definition: types.h:100
FLONG fl
Definition: path.h:46
eMaj lines
Definition: tritemp.h:206
VOID FASTCALL PATH_ScaleNormalizedPoint(FLOAT_POINT corners[], double x, double y, POINT *pPoint)
Definition: path.c:364
VOID FASTCALL PATH_EmptyPath(PPATH pPath)
Definition: path.c:247
RECTFX rcfxBoundBox
Definition: path.h:38
POINT pos
Definition: path.h:58
BOOL PATH_RestorePath(DC *, DC *)
Definition: path.c:210
Definition: polytest.cpp:40
Definition: cmds.c:130
BOOL FASTCALL PATH_PolyBezier(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1106
struct _EXTPATHDATA * ppdNext
Definition: path.h:31
BOOL FASTCALL PATH_FillPathEx(PDC dc, PPATH pPath, PBRUSH pbrFill)
Definition: path.c:1467
unsigned long DWORD
Definition: ntddk_ex.h:95
HGDIOBJ HPATH
Definition: path.h:14
GLbitfield flags
Definition: glext.h:7161
BOOL FASTCALL PATH_StrokePath(DC *dc, PPATH pPath)
Definition: path.c:1550
PATHDATA pd
Definition: path.h:30
struct _EPATHOBJ EPATHOBJ
PEXTPATHDATA ppdFirst
Definition: path.h:41
struct _EPATHOBJ * epo
Definition: path.h:49
struct _PATH PATH
BOOL FASTCALL PATH_Arc(PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd, INT direction, INT lines)
Definition: path.c:902
unsigned char BYTE
Definition: mem.h:68
BOOL FASTCALL PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECTL *lprc, LPCWSTR str, UINT count, const INT *dx)
Definition: path.c:2286
POINTFX ptfxSubPathStart
Definition: path.h:39
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3706
HGDIOBJ * PHPATH
Definition: path.h:14
BOOL FASTCALL PATH_PolyBezierTo(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1083
struct _EPATHOBJ * PEPATHOBJ
enum tagGdiPathState GdiPathState
Definition: path.h:19
BOOL FASTCALL PATH_PolylineTo(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1216
BOOL newStroke
Definition: path.h:57
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
BOOL FASTCALL PATH_DoArcPart(PPATH pPath, FLOAT_POINT corners[], double angleStart, double angleEnd, BYTE startEntryType)
Definition: path.c:841
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
VOID FASTCALL IntGdiCloseFigure(PPATH pPath)
Definition: path.c:109
float FLOAT
Definition: typedefs.h:67
unsigned int ULONG
Definition: retypes.h:1
BOOL FASTCALL PATH_AddEntry(PPATH pPath, const POINT *pPoint, BYTE flags)
Definition: path.c:263
BASEOBJECT BaseObject
Definition: path.h:36
BOOL FASTCALL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height)
Definition: path.c:664
FLONG state
Definition: path.h:52
BOOL FASTCALL PATH_Ellipse(PDC dc, INT x1, INT y1, INT x2, INT y2)
Definition: path.c:759