Commit 59b2aabd authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use ntgdi names for GetPath and PathToRegion.

parent 37a5c8b9
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
@ stdcall GetOutlineTextMetricsA(long long ptr) @ stdcall GetOutlineTextMetricsA(long long ptr)
@ stdcall GetOutlineTextMetricsW(long long ptr) @ stdcall GetOutlineTextMetricsW(long long ptr)
@ stdcall GetPaletteEntries(long long long ptr) @ stdcall GetPaletteEntries(long long long ptr)
@ stdcall GetPath(long ptr ptr long) @ stdcall GetPath(long ptr ptr long) NtGdiGetPath
@ stdcall GetPixel(long long long) NtGdiGetPixel @ stdcall GetPixel(long long long) NtGdiGetPixel
@ stdcall GetPixelFormat(long) @ stdcall GetPixelFormat(long)
@ stdcall GetPolyFillMode(long) @ stdcall GetPolyFillMode(long)
...@@ -388,7 +388,7 @@ ...@@ -388,7 +388,7 @@
@ stdcall OffsetWindowOrgEx(long long long ptr) @ stdcall OffsetWindowOrgEx(long long long ptr)
@ stdcall PaintRgn(long long) @ stdcall PaintRgn(long long)
@ stdcall PatBlt(long long long long long long) @ stdcall PatBlt(long long long long long long)
@ stdcall PathToRegion(long) @ stdcall PathToRegion(long) NtGdiPathToRegion
@ stdcall Pie(long long long long long long long long long) @ stdcall Pie(long long long long long long long long long)
@ stdcall PlayEnhMetaFile(long long ptr) @ stdcall PlayEnhMetaFile(long long ptr)
@ stdcall PlayEnhMetaFileRecord(long ptr ptr long) @ stdcall PlayEnhMetaFileRecord(long ptr ptr long)
......
...@@ -624,52 +624,49 @@ BOOL WINAPI NtGdiCloseFigure( HDC hdc ) ...@@ -624,52 +624,49 @@ BOOL WINAPI NtGdiCloseFigure( HDC hdc )
/*********************************************************************** /***********************************************************************
* GetPath (GDI32.@) * NtGdiGetPath (win32u.@)
*/ */
INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes, INT nSize) INT WINAPI NtGdiGetPath( HDC hdc, POINT *points, BYTE *types, INT size )
{ {
INT ret = -1; INT ret = -1;
DC *dc = get_dc_ptr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return -1; if (!dc) return -1;
if (!dc->path) if (!dc->path)
{ {
SetLastError(ERROR_CAN_NOT_COMPLETE); SetLastError( ERROR_CAN_NOT_COMPLETE );
goto done; }
} else if (size == 0)
{
ret = dc->path->count;
}
else if (size < dc->path->count)
{
SetLastError( ERROR_INVALID_PARAMETER );
}
else
{
memcpy( points, dc->path->points, sizeof(POINT) * dc->path->count );
memcpy( types, dc->path->flags, sizeof(BYTE) * dc->path->count );
if(nSize==0) /* Convert the points to logical coordinates */
ret = dc->path->count; if (dp_to_lp( dc, points, dc->path->count ))
else if(nSize<dc->path->count) ret = dc->path->count;
{ else
SetLastError(ERROR_INVALID_PARAMETER); /* FIXME: Is this the correct value? */
goto done; SetLastError( ERROR_CAN_NOT_COMPLETE );
} }
else
{
memcpy(pPoints, dc->path->points, sizeof(POINT)*dc->path->count);
memcpy(pTypes, dc->path->flags, sizeof(BYTE)*dc->path->count);
/* Convert the points to logical coordinates */ release_dc_ptr( dc );
if(!dp_to_lp(dc, pPoints, dc->path->count)) return ret;
{
/* FIXME: Is this the correct value? */
SetLastError(ERROR_CAN_NOT_COMPLETE);
goto done;
}
else ret = dc->path->count;
}
done:
release_dc_ptr( dc );
return ret;
} }
/*********************************************************************** /***********************************************************************
* PathToRegion (GDI32.@) * NtGdiPathToRegion (win32u.@)
*/ */
HRGN WINAPI PathToRegion(HDC hdc) HRGN WINAPI NtGdiPathToRegion( HDC hdc )
{ {
HRGN ret = 0; HRGN ret = 0;
DC *dc = get_dc_ptr( hdc ); DC *dc = get_dc_ptr( hdc );
...@@ -721,7 +718,7 @@ BOOL WINAPI NtGdiSelectClipPath( HDC hdc, INT mode ) ...@@ -721,7 +718,7 @@ BOOL WINAPI NtGdiSelectClipPath( HDC hdc, INT mode )
BOOL ret = FALSE; BOOL ret = FALSE;
HRGN rgn; HRGN rgn;
if ((rgn = PathToRegion( hdc ))) if ((rgn = NtGdiPathToRegion( hdc )))
{ {
ret = NtGdiExtSelectClipRgn( hdc, rgn, mode ) != ERROR; ret = NtGdiExtSelectClipRgn( hdc, rgn, mode ) != ERROR;
DeleteObject( rgn ); DeleteObject( rgn );
...@@ -2008,21 +2005,21 @@ BOOL CDECL nulldrv_CloseFigure( PHYSDEV dev ) ...@@ -2008,21 +2005,21 @@ BOOL CDECL nulldrv_CloseFigure( PHYSDEV dev )
BOOL CDECL nulldrv_FillPath( PHYSDEV dev ) BOOL CDECL nulldrv_FillPath( PHYSDEV dev )
{ {
if (GetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE; if (NtGdiGetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE;
NtGdiAbortPath( dev->hdc ); NtGdiAbortPath( dev->hdc );
return TRUE; return TRUE;
} }
BOOL CDECL nulldrv_StrokeAndFillPath( PHYSDEV dev ) BOOL CDECL nulldrv_StrokeAndFillPath( PHYSDEV dev )
{ {
if (GetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE; if (NtGdiGetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE;
NtGdiAbortPath( dev->hdc ); NtGdiAbortPath( dev->hdc );
return TRUE; return TRUE;
} }
BOOL CDECL nulldrv_StrokePath( PHYSDEV dev ) BOOL CDECL nulldrv_StrokePath( PHYSDEV dev )
{ {
if (GetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE; if (NtGdiGetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE;
NtGdiAbortPath( dev->hdc ); NtGdiAbortPath( dev->hdc );
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment