Author: jimtabor Date: Fri Sep 9 15:07:42 2016 New Revision: 72628
URL: http://svn.reactos.org/svn/reactos?rev=72628&view=rev Log: [NtGDI] - Fix remaining Path test results. Include Flat Path for Stroke Path. See CORE-4990.
Modified: trunk/reactos/win32ss/gdi/ntgdi/path.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/path.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/path.c?re... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/path.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/path.c [iso-8859-1] Fri Sep 9 15:07:42 2016 @@ -436,8 +436,8 @@ /* In GM_COMPATIBLE, don't include bottom and right edges */ if (pdcattr->iGraphicsMode == GM_COMPATIBLE) { - if (corners[0].x == corners[1].x) {DPRINT1("PATH_CheckCorners GM_COMPATIBLE x\n"); return FALSE;} - if (corners[0].y == corners[1].y) {DPRINT1("PATH_CheckCorners GM_COMPATIBLE y\n"); return FALSE;} + if (corners[0].x == corners[1].x) return FALSE; + if (corners[0].y == corners[1].y) return FALSE; corners[1].x--; corners[1].y--; } @@ -773,7 +773,6 @@
if (!PATH_CheckCorners(dc, corners, x1, y1, x2, y2)) { - DPRINT1("PATH_Ellipse bad corners\n"); PATH_UnlockPath(pPath); return TRUE; } @@ -1466,13 +1465,6 @@ PREGION Rgn; PDC_ATTR pdcattr = dc->pdcattr;
- if (pPath->state != PATH_Closed) - { - DPRINT("PFP : path not closed\n"); - EngSetLastError(ERROR_CAN_NOT_COMPLETE); - return FALSE; - } - /* Allocate a temporary region */ Rgn = IntSysCreateRectpRgn(0, 0, 0, 0); if (!Rgn) @@ -1559,9 +1551,6 @@ PDC_ATTR pdcattr = dc->pdcattr;
DPRINT("Enter %s\n", __FUNCTION__); - - if (pPath->state != PATH_Closed) - return FALSE;
/* Save the mapping mode info */ mapMode = pdcattr->iMapMode; @@ -2567,7 +2556,16 @@
pNewPath = PATH_FlattenPath(pPath);
- ret = PATH_FillPath(dc, pNewPath); + if (pNewPath->state != PATH_Closed) + { + EngSetLastError(ERROR_CAN_NOT_COMPLETE); + ret = FALSE; + } + else if (pNewPath->numEntriesUsed) + { + ret = PATH_FillPath(dc, pNewPath); + } + else ret = TRUE;
PATH_UnlockPath(pNewPath); PATH_Delete(pNewPath->BaseObject.hHmgr); @@ -2882,8 +2880,17 @@
pNewPath = PATH_FlattenPath(pPath);
- bRet = PATH_FillPath(pDc, pNewPath); - if (bRet) bRet = PATH_StrokePath(pDc, pNewPath); + if (pNewPath->state != PATH_Closed) + { + EngSetLastError(ERROR_CAN_NOT_COMPLETE); + bRet = FALSE; + } + else if (pNewPath->numEntriesUsed) + { + bRet = PATH_FillPath(pDc, pNewPath); + if (bRet) bRet = PATH_StrokePath(pDc, pNewPath); + } + else bRet = TRUE;
PATH_UnlockPath(pNewPath); PATH_Delete(pNewPath->BaseObject.hHmgr); @@ -2904,7 +2911,7 @@ { DC *pDc; PDC_ATTR pdcattr; - PPATH pPath; + PPATH pPath, pNewPath; BOOL bRet = FALSE;
DPRINT("Enter %s\n", __FUNCTION__); @@ -2929,7 +2936,17 @@ if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) DC_vUpdateLineBrush(pDc);
- bRet = PATH_StrokePath(pDc, pPath); + pNewPath = PATH_FlattenPath(pPath); + + if (pNewPath->state != PATH_Closed) + { + EngSetLastError(ERROR_CAN_NOT_COMPLETE); + bRet = FALSE; + } + else bRet = PATH_StrokePath(pDc, pNewPath); + + PATH_UnlockPath(pNewPath); + PATH_Delete(pNewPath->BaseObject.hHmgr);
DC_vFinishBlit(pDc, NULL);