@@ -436,8 +436,8 @@ PATH_CheckCorners(
436
436
/* In GM_COMPATIBLE, don't include bottom and right edges */
437
437
if (pdcattr -> iGraphicsMode == GM_COMPATIBLE )
438
438
{
439
- if (corners [0 ].x == corners [1 ].x ) { DPRINT1 ( "PATH_CheckCorners GM_COMPATIBLE x\n" ); return FALSE;}
440
- if (corners [0 ].y == corners [1 ].y ) { DPRINT1 ( "PATH_CheckCorners GM_COMPATIBLE y\n" ); return FALSE;}
439
+ if (corners [0 ].x == corners [1 ].x ) return FALSE;
440
+ if (corners [0 ].y == corners [1 ].y ) return FALSE;
441
441
corners [1 ].x -- ;
442
442
corners [1 ].y -- ;
443
443
}
@@ -773,7 +773,6 @@ PATH_Ellipse(
773
773
774
774
if (!PATH_CheckCorners (dc , corners , x1 , y1 , x2 , y2 ))
775
775
{
776
- DPRINT1 ("PATH_Ellipse bad corners\n" );
777
776
PATH_UnlockPath (pPath );
778
777
return TRUE;
779
778
}
@@ -1466,13 +1465,6 @@ PATH_FillPath(
1466
1465
PREGION Rgn ;
1467
1466
PDC_ATTR pdcattr = dc -> pdcattr ;
1468
1467
1469
- if (pPath -> state != PATH_Closed )
1470
- {
1471
- DPRINT ("PFP : path not closed\n" );
1472
- EngSetLastError (ERROR_CAN_NOT_COMPLETE );
1473
- return FALSE;
1474
- }
1475
-
1476
1468
/* Allocate a temporary region */
1477
1469
Rgn = IntSysCreateRectpRgn (0 , 0 , 0 , 0 );
1478
1470
if (!Rgn )
@@ -1560,9 +1552,6 @@ PATH_StrokePath(
1560
1552
1561
1553
DPRINT ("Enter %s\n" , __FUNCTION__ );
1562
1554
1563
- if (pPath -> state != PATH_Closed )
1564
- return FALSE;
1565
-
1566
1555
/* Save the mapping mode info */
1567
1556
mapMode = pdcattr -> iMapMode ;
1568
1557
@@ -2567,7 +2556,16 @@ NtGdiFillPath(HDC hDC)
2567
2556
2568
2557
pNewPath = PATH_FlattenPath (pPath );
2569
2558
2570
- ret = PATH_FillPath (dc , pNewPath );
2559
+ if (pNewPath -> state != PATH_Closed )
2560
+ {
2561
+ EngSetLastError (ERROR_CAN_NOT_COMPLETE );
2562
+ ret = FALSE;
2563
+ }
2564
+ else if (pNewPath -> numEntriesUsed )
2565
+ {
2566
+ ret = PATH_FillPath (dc , pNewPath );
2567
+ }
2568
+ else ret = TRUE;
2571
2569
2572
2570
PATH_UnlockPath (pNewPath );
2573
2571
PATH_Delete (pNewPath -> BaseObject .hHmgr );
@@ -2882,8 +2880,17 @@ NtGdiStrokeAndFillPath(HDC hDC)
2882
2880
2883
2881
pNewPath = PATH_FlattenPath (pPath );
2884
2882
2885
- bRet = PATH_FillPath (pDc , pNewPath );
2886
- if (bRet ) bRet = PATH_StrokePath (pDc , pNewPath );
2883
+ if (pNewPath -> state != PATH_Closed )
2884
+ {
2885
+ EngSetLastError (ERROR_CAN_NOT_COMPLETE );
2886
+ bRet = FALSE;
2887
+ }
2888
+ else if (pNewPath -> numEntriesUsed )
2889
+ {
2890
+ bRet = PATH_FillPath (pDc , pNewPath );
2891
+ if (bRet ) bRet = PATH_StrokePath (pDc , pNewPath );
2892
+ }
2893
+ else bRet = TRUE;
2887
2894
2888
2895
PATH_UnlockPath (pNewPath );
2889
2896
PATH_Delete (pNewPath -> BaseObject .hHmgr );
@@ -2904,7 +2911,7 @@ NtGdiStrokePath(HDC hDC)
2904
2911
{
2905
2912
DC * pDc ;
2906
2913
PDC_ATTR pdcattr ;
2907
- PPATH pPath ;
2914
+ PPATH pPath , pNewPath ;
2908
2915
BOOL bRet = FALSE;
2909
2916
2910
2917
DPRINT ("Enter %s\n" , __FUNCTION__ );
@@ -2929,7 +2936,17 @@ NtGdiStrokePath(HDC hDC)
2929
2936
if (pdcattr -> ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY ))
2930
2937
DC_vUpdateLineBrush (pDc );
2931
2938
2932
- bRet = PATH_StrokePath (pDc , pPath );
2939
+ pNewPath = PATH_FlattenPath (pPath );
2940
+
2941
+ if (pNewPath -> state != PATH_Closed )
2942
+ {
2943
+ EngSetLastError (ERROR_CAN_NOT_COMPLETE );
2944
+ bRet = FALSE;
2945
+ }
2946
+ else bRet = PATH_StrokePath (pDc , pNewPath );
2947
+
2948
+ PATH_UnlockPath (pNewPath );
2949
+ PATH_Delete (pNewPath -> BaseObject .hHmgr );
2933
2950
2934
2951
DC_vFinishBlit (pDc , NULL );
2935
2952
0 commit comments