1 #pragma once 2 3 /* DCPATH flPath */ 4 enum _DCPATHFLAGS 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 { 18 PATH_Null, 19 PATH_Open, 20 PATH_Closed 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 { 30 PATHDATA pd; 31 struct _EXTPATHDATA *ppdNext; 32 } EXTPATHDATA, *PEXTPATHDATA; 33 34 typedef struct _PATH 35 { 36 BASEOBJECT BaseObject; 37 //PVOID ppachain; 38 RECTFX rcfxBoundBox; 39 POINTFX ptfxSubPathStart; 40 FLONG flType; 41 PEXTPATHDATA ppdFirst; 42 PEXTPATHDATA ppdLast; 43 FLONG flags; // PATHDATA flags. 44 PEXTPATHDATA ppdCurrent; 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: 52 FLONG state; 53 POINT *pPoints; 54 BYTE *pFlags; 55 int numEntriesUsed; 56 int numEntriesAllocated; 57 BOOL newStroke; 58 POINT pos; 59 } PATH, *PPATH; 60 61 typedef struct _EPATHOBJ 62 { 63 PATHOBJ po; 64 PPATH pPath; 65 CLIPOBJ *pco; 66 } EPATHOBJ, *PEPATHOBJ; 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); 77 BOOL FASTCALL PATH_Ellipse (PDC dc, INT x1, INT y1, INT x2, INT y2); 78 VOID FASTCALL PATH_EmptyPath (PPATH pPath); 79 BOOL FASTCALL PATH_LineTo (PDC dc, INT x, INT y); 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); 86 BOOL FASTCALL PATH_Rectangle (PDC dc, INT x1, INT y1, INT x2, INT y2); 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); 89 BOOL FASTCALL PATH_ExtTextOut(PDC dc,INT x,INT y,UINT flags,const RECTL *lprc,LPCWSTR str,UINT count,const INT *dx); 90 91 BOOL FASTCALL PATH_AddEntry (PPATH pPath, const POINT *pPoint, BYTE flags); 92 BOOL FASTCALL PATH_AddFlatBezier (PPATH pPath, POINT *pt, BOOL closed); 93 BOOL FASTCALL PATH_DoArcPart (PPATH pPath, FLOAT_POINT corners[], double angleStart, double angleEnd, BYTE startEntryType); 94 BOOL FASTCALL PATH_FillPath( PDC dc, PPATH pPath ); 95 BOOL FASTCALL PATH_FillPathEx(PDC dc, PPATH pPath, PBRUSH pbrFill); 96 PPATH FASTCALL PATH_FlattenPath (PPATH pPath); 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); 101 BOOL FASTCALL PATH_StrokePath(DC *dc, PPATH pPath); 102 BOOL PATH_CheckCorners(DC *dc, POINT corners[], INT x1, INT y1, INT x2, INT y2); 103 104 VOID FASTCALL IntGdiCloseFigure(PPATH pPath); 105 BOOL FASTCALL PATH_Delete(HPATH hPath); 106 107 VOID FASTCALL IntGetCurrentPositionEx(PDC dc, LPPOINT pt); 108 109 BOOL PATH_RestorePath( DC *, DC *); 110 BOOL PATH_SavePath( DC *, DC *); 111 BOOL IntGdiFillRgn(PDC pdc, PREGION prgn, PBRUSH pbrFill); 112 PPATH FASTCALL 113 IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit); 114