wineps.drv: Reset the device path once it has been painted.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-06-16 00:36:06 +09:00
parent bd53a012b4
commit e0f3f020c0
1 changed files with 6 additions and 1 deletions

View File

@ -516,7 +516,11 @@ static BOOL paint_path( PHYSDEV dev, BOOL stroke, BOOL fill )
int i, size = GetPath( dev->hdc, NULL, NULL, 0 ); int i, size = GetPath( dev->hdc, NULL, NULL, 0 );
if (size == -1) return FALSE; if (size == -1) return FALSE;
if (!size) return TRUE; if (!size)
{
AbortPath( dev->hdc );
return TRUE;
}
points = HeapAlloc( GetProcessHeap(), 0, size * sizeof(*points) ); points = HeapAlloc( GetProcessHeap(), 0, size * sizeof(*points) );
types = HeapAlloc( GetProcessHeap(), 0, size * sizeof(*types) ); types = HeapAlloc( GetProcessHeap(), 0, size * sizeof(*types) );
if (!points || !types) goto done; if (!points || !types) goto done;
@ -549,6 +553,7 @@ static BOOL paint_path( PHYSDEV dev, BOOL stroke, BOOL fill )
if (stroke) PSDRV_DrawLine(dev); if (stroke) PSDRV_DrawLine(dev);
else PSDRV_WriteNewPath(dev); else PSDRV_WriteNewPath(dev);
PSDRV_ResetClip(dev); PSDRV_ResetClip(dev);
AbortPath( dev->hdc );
done: done:
HeapFree( GetProcessHeap(), 0, points ); HeapFree( GetProcessHeap(), 0, points );