18#pragma warning(disable:4244)
21#define NUM_ENTRIES_INITIAL 16
23#define GROW_FACTOR_NUMER 2
24#define GROW_FACTOR_DENOM 1
27static int PathCount = 0;
45 TRACE(
"CreatePath p 0x%p\n", pPath);
69 TRACE(
"Create Path %d\n",PathCount);
93 if (!hPath)
return FALSE;
95 if (!pPath)
return FALSE;
100 TRACE(
"Delete Path %d\n",PathCount);
168 const PPATH pPathSrc)
180 pPathDest->
pos = pPathSrc->
pos;
190 TRACE(
"PATH_SavePath\n");
193 TRACE(
"PATH_SavePath 1\n");
197 dst->dclevel.flPath =
src->dclevel.flPath;
211 TRACE(
"PATH_RestorePath\n");
213 if (
dst->dclevel.hPath ==
NULL)
216 TRACE(
"PATH_RestorePath 1\n");
218 dst->dclevel.flPath =
src->dclevel.flPath;
230 TRACE(
"PATH_RestorePath 2\n");
300 INT numEntriesToAllocate;
316 while (numEntriesToAllocate < numEntries)
320 numEntriesToAllocate = numEntries;
347 pPath->
pFlags = pFlagsNew;
508 if (!
path->newStroke &&
path->numEntriesUsed &&
510 path->pPoints[
path->numEntriesUsed - 1].x ==
path->pos.x &&
511 path->pPoints[
path->numEntriesUsed - 1].y ==
path->pos.y)
558 if (!pPath)
return FALSE;
563 TRACE(
"MoveTo has changed\n");
593 if (!pPath)
return FALSE;
604 TRACE(
"Line To : New Stroke\n");
640 if (!pPath)
return FALSE;
693 if (!pPath)
return FALSE;
713 TRACE(
"xOffset %d, yOffset %d, Rect WxH: %dx%d.\n",
721 ell_height =
EngMulDiv(ell_height, 1, 2);
796 TRACE(
"PATH_Ellipse: %p -> (%d, %d) - (%d, %d)\n",
819 TRACE(
"xOffset %d, yOffset %d, Rect WxH: %dx%d.\n",
868 ERR(
"PATH_Ellipse No add\n");
898 float xNorm[4], yNorm[4];
908 halfAngle = (angleEnd - angleStart) / 2.0;
909 if (
fabs(halfAngle) > 1
e-8)
911 a = 4.0 / 3.0 * (1 -
cos(halfAngle)) /
sin(halfAngle);
912 xNorm[0] =
cos(angleStart);
913 yNorm[0] =
sin(angleStart);
914 xNorm[1] = xNorm[0] -
a * yNorm[0];
915 yNorm[1] = yNorm[0] +
a * xNorm[0];
916 xNorm[3] =
cos(angleEnd);
917 yNorm[3] =
sin(angleEnd);
918 xNorm[2] = xNorm[3] +
a * yNorm[3];
919 yNorm[2] = yNorm[3] -
a * xNorm[3];
922 for (
i = 0;
i < 4;
i++)
924 xNorm[
i] =
cos(angleStart);
925 yNorm[
i] =
sin(angleStart);
929 start = !startEntryType;
968 double angleStart, angleEnd, angleStartQuadrant, angleEndQuadrant = 0.0;
971 POINT corners[2], pointStart, pointEnd;
972 POINT centre, pointCurPos;
984 if (!pPath)
return FALSE;
999 corners[0].
x =
x1; corners[0].
y =
y1;
1000 corners[1].
x =
x2; corners[1].
y =
y2;
1001 pointStart.
x = xStart; pointStart.
y = yStart;
1002 pointEnd.
x = xEnd; pointEnd.
y = yEnd;
1008 if (corners[0].
x > corners[1].
x)
1010 temp = corners[0].
x;
1011 corners[0].
x = corners[1].
x;
1012 corners[1].
x =
temp;
1014 if (corners[0].
y > corners[1].
y)
1016 temp = corners[0].
y;
1017 corners[0].
y = corners[1].
y;
1018 corners[1].
y =
temp;
1030 if (angleEnd <= angleStart)
1032 angleEnd += 2 *
M_PI;
1033 ASSERT(angleEnd >= angleStart);
1038 if (angleEnd >= angleStart)
1040 angleEnd -= 2 *
M_PI;
1041 ASSERT(angleEnd <= angleStart);
1074 angleStartQuadrant = angleStart;
1082 angleStartQuadrant = angleEndQuadrant;
1084 angleEndQuadrant +=
M_PI_2;
1086 angleEndQuadrant -=
M_PI_2;
1090 if ((clockwise && angleEnd < angleEndQuadrant) ||
1091 (!clockwise && angleEnd > angleEndQuadrant))
1094 angleEndQuadrant = angleEnd;
1119 centre.
x = (corners[0].
x + corners[1].
x) / 2;
1120 centre.
y = (corners[0].
y + corners[1].
y) / 2;
1144 if (!pPath)
return FALSE;
1167 if (!pPath)
return FALSE;
1187 POINT orig_pos, cur_pos;
1191 if (!pPath)
return FALSE;
1200 orig_pos = pPath->
pos;
1204 TRACE(
"PPD : Current pos X %d Y %d\n",pPath->
pos.
x, pPath->
pos.
y);
1205 TRACE(
"PPD : last %d pos X %d Y %d\n",lastmove, pPath->
pPoints[lastmove].
x, pPath->
pPoints[lastmove].
y);
1208 for(
i = 0;
i < cbPoints;
i++)
1214 pPath->
pos = pts[
i];
1241 pPath->
pos = orig_pos;
1243 TRACE(
"PPD Bad : pos X %d Y %d\n",pPath->
pos.
x, pPath->
pos.
y);
1255 TRACE(
"PPD close : pos X %d Y %d\n",pPath->
pos.
x, pPath->
pos.
y);
1276 if (cbPoints < 1)
return FALSE;
1279 if (!pPath)
return FALSE;
1303 if (!polygons)
return FALSE;
1306 if (!pPath)
return FALSE;
1309 for (poly =
count = 0; poly < polygons; poly++)
1311 if (counts[poly] < 2)
1316 count += counts[poly];
1327 for (poly = 0; poly < polygons;
type += counts[poly++])
1341 const DWORD* counts,
1359 for (
i = 0, poly = 0; poly < polylines; poly++)
1388 if (!pts)
return FALSE;
1390 for (
i = 1;
i <
no;
i++)
1411 TRACE(
"PATH_FlattenPath\n");
1438 TRACE(
"PATH_FlattenPath good\n");
1455 int i,
pos, polygons;
1464 ERR(
"Failed to allocate %lu strokes\n", (pPath->
numEntriesUsed / 2) *
sizeof(*counts));
1474 counts[polygons++] =
i -
pos;
1477 if (
i >
pos + 1) counts[polygons++] =
i -
pos;
1479 ASSERT( polygons <= pPath->numEntriesUsed / 2 );
1489 ERR(
"REGION_SetPolyPolygonRgn failed\n");
1519 INT mapMode, graphicsMode;
1520 SIZE ptViewportExt, ptWindowExt;
1521 POINTL ptViewportOrg, ptWindowOrg;
1536 TRACE(
"PFP : Fail P2R\n");
1602 INT nLinePts, nAlloc, jOldFillMode,
i = 0;
1604 POINT ptViewportOrg, ptWindowOrg;
1605 SIZE szViewportExt, szWindowExt;
1606 DWORD mapMode, graphicsMode;
1614 pbrLine =
dc->dclevel.pbrLine;
1635 ptViewportOrg =
dc->pdcattr->ptlViewportOrg;
1636 szWindowExt =
dc->pdcattr->szlWindowExt;
1637 ptWindowOrg =
dc->pdcattr->ptlWindowOrg;
1659 ERR(
"Can't allocate pool!\n");
1670 ERR(
"Expected PT_MOVETO %s, got path flag %d\n",
1671 i == 0 ?
"as first point" :
"after PT_CLOSEFIGURE",
1679 TRACE(
"Got PT_MOVETO (%ld, %ld)\n",
1683 pLinePts[nLinePts++] = pPath->
pPoints[
i];
1687 TRACE(
"Got PT_LINETO (%ld, %ld)\n",
1689 pLinePts[nLinePts++] = pPath->
pPoints[
i];
1692 TRACE(
"Got PT_BEZIERTO\n");
1696 ERR(
"Path didn't contain 3 successive PT_BEZIERTOs\n");
1702 INT nBzrPts, nMinAlloc;
1708 if (nAlloc < nMinAlloc)
1713 nAlloc = nMinAlloc * 2;
1716 nAlloc *
sizeof(
POINT),
1721 ERR(
"Can't allocate pool!\n");
1730 memcpy(&pLinePts[nLinePts], &pBzrPts[1], (nBzrPts - 1) *
sizeof(
POINT));
1731 nLinePts += nBzrPts - 1;
1737 ERR(
"Got path flag %d (not supported)\n", (
INT)pPath->
pFlags[
i]);
1743 pLinePts[nLinePts++] = pLinePts[0];
1786#define round(x) ((int)((x)>0?(x)+0.5:(x)-0.5))
1791 INT i,
j, numStrokes, numOldStrokes, penWidthIn, penWidthOut;
1792 PPATH flat_path, pNewPath, *pStrokes =
NULL, *pOldStrokes, pUpPath, pDownPath;
1794 DWORD joint, endcap;
1801 ERR(
"PATH_FlattenPath\n");
1805 penWidthIn = penWidth / 2;
1806 penWidthOut = penWidth / 2;
1807 if (penWidthIn + penWidthOut < penWidth)
1818 ERR(
"Expected PT_MOVETO %s, got path flag %c\n",
1819 i == 0 ?
"as first point" :
"after PT_CLOSEFIGURE",
1834 numOldStrokes = numStrokes;
1837 if (numStrokes == 1)
1841 pOldStrokes = pStrokes;
1860 if (!pStrokes[numStrokes - 1])
1874 ERR(
"Should never happen\n");
1877 ERR(
"Got path flag %c\n", flat_path->
pFlags[
i]);
1888 for (
i = 0;
i < numStrokes;
i++)
1900 if ((!(pStrokes[
i]->pFlags[pStrokes[
i]->numEntriesUsed - 1] &
PT_CLOSEFIGURE)) && (
j == 0 ||
j == pStrokes[
i]->numEntriesUsed - 1))
1921 theta =
atan2(ya - yo, xa - xo);
1942 corners[0].
x = xo - penWidthIn;
1943 corners[0].
y = yo - penWidthIn;
1944 corners[1].
x = xo + penWidthOut;
1945 corners[1].
y = yo + penWidthOut;
1958 double xa, ya, xb, yb, xo, yo;
1959 double alpha, theta, miterWidth;
1960 DWORD _joint = joint;
1962 PPATH pInsidePath, pOutsidePath;
1963 if (
j > 0 &&
j < pStrokes[
i]->numEntriesUsed - 1)
1984 theta =
atan2(yo - ya, xo - xa);
1994 pInsidePath = pUpPath;
1995 pOutsidePath = pDownPath;
1999 pInsidePath = pDownPath;
2000 pOutsidePath = pUpPath;
2120 PPATH pPath, pNewPath;
2139 UINT penWidth, penStyle;
2172 penStyle = ((
LOGPEN*)elp)->lopnStyle;
2198 return IntGdiWidenPath(pPath, penWidth, penStyle,
dc->dclevel.laPath.eMiterLimit);
2203 return (
f.fract >= 0x8000) ? (
f.value + 1) :
f.value;
2240 pt[1] = lppt[
i + 1];
2241 pt[2].x = (lppt[
i + 2].
x + lppt[
i + 1].
x) / 2;
2242 pt[2].y = (lppt[
i + 2].
y + lppt[
i + 1].
y) / 2;
2249 pt[1] = lppt[
i + 1];
2250 pt[2] = lppt[
i + 2];
2278 ERR(
"Unknown header type %lu\n",
header->dwType);
2292 switch(curve->
wType)
2298 for (
i = 0;
i < curve->
cpfx;
i++)
2321 for (
i = 0;
i < curve->
cpfx;
i++)
2334 ERR(
"Unknown curve type %04x\n", curve->
wType);
2377 ERR(
"PATH_ExtTextOut not open\n");
2468 if (!
dc->dclevel.hPath)
2480 dc->dclevel.hPath = 0;
2481 dc->dclevel.flPath &= ~DCPATH_ACTIVE;
2508 if (
dc->dclevel.hPath)
2510 TRACE(
"BeginPath 1 0x%p\n",
dc->dclevel.hPath);
2524 dc->dclevel.hPath =
NULL;
2532 TRACE(
"BP : Current pos X %d Y %d\n",pPath->
pos.
x, pPath->
pos.
y);
2607 TRACE(
"EndPath ERROR! 0x%p\n",
dc->dclevel.hPath);
2614 TRACE(
"EndPath 0x%p\n",
dc->dclevel.hPath);
2616 dc->dclevel.flPath &= ~DCPATH_ACTIVE;
2629 PPATH pPath, pNewPath;
2649 pdcattr =
dc->pdcattr;
2674 dc->dclevel.hPath = 0;
2675 dc->dclevel.flPath &= ~DCPATH_ACTIVE;
2745 *
pdwOut = pDc->dclevel.laPath.eMiterLimit;
2784 TRACE(
"NtGdiGetPath start\n");
2787 ERR(
"Can't lock dc!\n");
2809 else if (nSize < pPath->numEntriesUsed)
2838 TRACE(
"NtGdiGetPath exit %d\n",
ret);
2848 PPATH pPath, pNewPath;
2860 ERR(
"Failed to lock DC %p\n",
hDC);
2865 pdcattr = pDc->pdcattr;
2870 ERR(
"Failed to lock DC path %p\n", pDc->dclevel.hPath);
2878 ERR(
"Path is not closed!\n");
2887 ERR(
"Failed to allocate a region\n");
2895 if (pNewPath ==
NULL)
2897 ERR(
"Failed to flatten path %p\n", pDc->dclevel.hPath);
2911 ERR(
"PATH_PathToRegion failed\n");
2921 pDc->dclevel.hPath =
NULL;
2922 pDc->dclevel.flPath &= ~DCPATH_ACTIVE;
2946 worker1.
f = pDc->dclevel.laPath.eMiterLimit;
2947 pDc->dclevel.laPath.eMiterLimit = worker.
f;
2974 PPATH pPath, pNewPath;
2993 pdcattr = pDc->pdcattr;
3019 pDc->dclevel.hPath = 0;
3020 pDc->dclevel.flPath &= ~DCPATH_ACTIVE;
3033 PPATH pPath, pNewPath;
3053 pdcattr = pDc->pdcattr;
3073 pDc->dclevel.hPath = 0;
3074 pDc->dclevel.flPath &= ~DCPATH_ACTIVE;
3087 TRACE(
"NtGdiWidenPat Enter\n");
3097 TRACE(
"WindenPath New Path\n");
3103 TRACE(
"NtGdiWidenPat Ret %d\n",Ret);
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
char ACPI_OBJECT_TYPE * Types
POINT * GDI_Bezier(const POINT *Points, INT count, INT *nPtsOut)
#define DBG_DEFAULT_CHANNEL(ch)
#define CoordLPtoDP(pdc, ppt)
static BOOLEAN INTERNAL_LPTODP(DC *dc, LPPOINT points, UINT count)
#define XForm2MatrixS(m, x)
#define MatrixS2XForm(x, m)
FORCEINLINE PSIZEL DC_pszlViewportExt(PDC pdc)
static BOOLEAN IntDPtoLP(DC *pdc, PPOINTL ppt, UINT count)
static BOOLEAN IntLPtoDP(DC *pdc, PPOINTL ppt, UINT count)
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
VOID FASTCALL DC_vUpdateLineBrush(PDC pdc)
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
VOID FASTCALL DC_vUpdateFillBrush(PDC pdc)
FORCEINLINE PDC DC_LockDc(HDC hdc)
#define ERROR_NOT_ENOUGH_MEMORY
static WCHAR no[MAX_STRING_RESOURCE_LEN]
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
static void cleanup(void)
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
static const FLOATOBJ gef1
static const FLOATOBJ gef2
#define FLOATOBJ_bConvertToLong(pf, pl)
ULONG FASTCALL ftGdiGetGlyphOutline(PDC dc, WCHAR wch, UINT iFormat, LPGLYPHMETRICS pgm, ULONG cjBuf, PVOID pvBuf, LPMAT2 pmat2, BOOL bIgnoreRotation)
#define GDI_HANDLE_GET_TYPE(h)
#define GDI_OBJECT_TYPE_EXTPEN
#define GDI_OBJECT_TYPE_PEN
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define EXCEPTION_EXECUTE_HANDLER
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)
BOOL FASTCALL IntGdiPolyline(DC *dc, LPPOINT pt, int Count)
BOOL FASTCALL IntGdiMoveToEx(DC *dc, int X, int Y, LPPOINT Point)
#define memcpy(s1, s2, n)
#define ExFreePoolWithTag(_P, _T)
void * Realloc(void *, size_t)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
int APIENTRY IntGdiSetMapMode(PDC dc, int MapMode)
BOOL NTAPI GreModifyWorldTransform(PDC pdc, const XFORML *pxform, DWORD dwMode)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiEndPath(_In_ HDC hdc)
__kernel_entry W32KAPI INT APIENTRY NtGdiGetPath(_In_ HDC hdc, _Out_writes_opt_(cptBuf) LPPOINT pptlBuf, _Out_writes_opt_(cptBuf) LPBYTE pjTypes, _In_ INT cptBuf)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiCloseFigure(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiFlattenPath(_In_ HDC hdc)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiPathToRegion(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiStrokePath(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiAbortPath(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiWidenPath(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiFillPath(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiSetMiterLimit(_In_ HDC hdc, _In_ DWORD dwNew, _Inout_opt_ PDWORD pdwOut)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiBeginPath(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiStrokeAndFillPath(_In_ HDC hdc)
#define PATH_AllocPathWithHandle()
#define PATH_UnlockPath(pPath)
#define PATH_LockPath(hPath)
#define IntIsEffectiveWidePen(pbrLine)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
static unsigned __int64 next
PULONG MinorVersion OPTIONAL
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
BOOL IntGdiFillRgn(_In_ PDC pdc, _In_ PREGION prgn, _In_opt_ PBRUSH pbrFill)
INT NTAPI GreGetObject(IN HGDIOBJ hobj, IN INT cbCount, OUT PVOID pvBuffer)
VOID NTAPI GDIOBJ_vUnlockObject(POBJ pobj)
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
VOID FASTCALL IntGetCurrentPositionEx(PDC dc, LPPOINT pt)
static BYTE * add_log_points(DC *dc, PPATH path, const POINT *points, DWORD count, BYTE type)
#define NUM_ENTRIES_INITIAL
BOOL FASTCALL PATH_AssignGdiPath(PPATH pPathDest, const PPATH pPathSrc)
BOOL PATH_RestorePath(DC *dst, DC *src)
BOOL FASTCALL PATH_PolyBezierTo(PDC dc, const POINT *pts, DWORD cbPoints)
static BOOLEAN PATH_ScaleNormalizedPoint(POINT corners[], FLOATL x, FLOATL y, POINT *pPoint)
BOOL FASTCALL PATH_PolyPolygon(PDC dc, const POINT *pts, const INT *counts, UINT polygons)
BOOL FASTCALL PATH_PolyBezier(PDC dc, const POINT *pts, DWORD cbPoints)
BOOL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height)
PPATH FASTCALL IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit)
BOOL FASTCALL PATH_PathToRegion(PPATH pPath, INT Mode, PREGION Rgn)
BOOL FASTCALL PATH_Rectangle(PDC dc, INT x1, INT y1, INT x2, INT y2)
BOOL FASTCALL PATH_Delete(HPATH hPath)
static void update_current_pos(PPATH path)
static BOOL PATH_CheckRect(DC *dc, RECTL *rect, INT x1, INT y1, INT x2, INT y2)
#define GROW_FACTOR_DENOM
BOOL FASTCALL PATH_FillPathEx(PDC dc, PPATH pPath, PBRUSH pbrFill)
VOID FASTCALL PATH_DestroyGdiPath(PPATH pPath)
BOOL FASTCALL PATH_ReserveEntries(PPATH pPath, INT numEntries)
static void close_figure(PPATH path)
VOID FASTCALL IntGdiCloseFigure(PPATH pPath)
VOID FASTCALL PATH_InitGdiPath(PPATH pPath)
BOOL PATH_Ellipse(PDC dc, INT x1, INT y1, INT x2, INT y2)
static BOOL PATH_DoArcPart(PPATH pPath, POINT corners[], double angleStart, double angleEnd, BYTE startEntryType)
BOOL FASTCALL PATH_PolylineTo(PDC dc, const POINT *pts, DWORD cbPoints)
BOOL FASTCALL GdiPathDPtoLP(PDC pdc, PPOINT ppt, INT count)
BOOL FASTCALL PATH_LineTo(PDC dc, INT x, INT y)
static VOID FASTCALL PATH_BezierTo(PPATH pPath, POINT *lppt, INT n)
static VOID PATH_NormalizePoint(POINTL corners[], const POINTL *pPoint, FLOATL *pX, FLOATL *pY)
BOOL FASTCALL PATH_FillPath(PDC dc, PPATH pPath)
BOOL FASTCALL PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECTL *lprc, LPCWSTR str, UINT count, const INT *dx)
PPATH FASTCALL PATH_FlattenPath(PPATH pPath)
BOOL FASTCALL PATH_StrokePath(DC *dc, PPATH pPath)
BOOL FASTCALL PATH_AddEntry(PPATH pPath, const POINT *pPoint, BYTE flags)
VOID FASTCALL PATH_EmptyPath(PPATH pPath)
BOOL FASTCALL PATH_PolyPolyline(PDC dc, const POINT *pts, const DWORD *counts, DWORD polylines)
#define GROW_FACTOR_NUMER
static BOOL add_log_points_new_stroke(DC *dc, PPATH path, const POINT *points, DWORD count, BYTE type)
PPATH FASTCALL PATH_CreatePath(int count)
static BYTE * add_points(PPATH path, const POINT *points, DWORD count, BYTE type)
BOOL FASTCALL PATH_PolyDraw(PDC dc, const POINT *pts, const BYTE *types, DWORD cbPoints)
BOOL FASTCALL PATH_AddFlatBezier(PPATH pPath, POINT *pt, BOOL closed)
static void reverse_points(POINT *points, UINT count)
static BOOL start_new_stroke(PPATH path)
static INT int_from_fixed(FIXED f)
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)
PPATH FASTCALL PATH_WidenPathEx(DC *dc, PPATH pPath)
BOOL FASTCALL PATH_MoveTo(PDC dc, PPATH pPath)
static BOOL FASTCALL PATH_add_outline(PDC dc, PPATH pPath, INT x, INT y, TTPOLYGONHEADER *header, DWORD size)
static PPATH FASTCALL PATH_WidenPath(DC *dc)
BOOL PATH_SavePath(DC *dst, DC *src)
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
FORCEINLINE LONG RECTL_lGetWidth(_In_ const RECTL *prcl)
FORCEINLINE VOID RECTL_vSetRect(_Out_ RECTL *prcl, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
FORCEINLINE LONG RECTL_lGetHeight(_In_ const RECTL *prcl)
VOID FASTCALL REGION_Delete(PREGION pRgn)
BOOL FASTCALL REGION_SetPolyPolygonRgn(_Inout_ PREGION prgn, _In_ const POINT *ppt, _In_ const ULONG *pcPoints, _In_ ULONG cPolygons, _In_ INT iMode)
VOID FASTCALL REGION_UnlockRgn(_In_ PREGION prgn)
PREGION FASTCALL IntSysCreateRectpRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
PREGION FASTCALL REGION_AllocUserRgnWithHandle(INT nRgn)
*nSize LPSTR _Inout_ LPDWORD nSize
#define FLOATOBJ_Div(pf, pf1)
#define FLOATOBJ_DivLong(pf, l)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
#define FLOATOBJ_Sub(pf, pf1)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
#define FLOATOBJ_Add(pf, pf1)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
#define FLOATOBJ_MulLong(pf, l)
ENGAPI INT APIENTRY EngMulDiv(_In_ INT a, _In_ INT b, _In_ INT c)
#define FLOATOBJ_SetFloat(pf, f)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define FLOATOBJ_GetFloat(pf)
#define FLOATOBJ_SetLong(pf, l)
#define FLOATOBJ_AddLong(pf, l)
#define ERROR_CAN_NOT_COMPLETE
#define ERROR_ARITHMETIC_OVERFLOW
struct tagPOINTFX POINTFX
_In_ int _Inout_ LPRECT lprc