Implement NtGdiGetPath (based on wine)

svn path=/trunk/; revision=24004
This commit is contained in:
Saveliy Tretiakov 2006-09-09 19:26:43 +00:00
parent 0f51b5f0bc
commit 70a18c5a4e

View file

@ -189,13 +189,63 @@ NtGdiGetMiterLimit(
INT
STDCALL
NtGdiGetPath(HDC hDC,
LPPOINT Points,
LPBYTE Types,
INT nSize)
NtGdiGetPath(
HDC hDC,
LPPOINT Points,
LPBYTE Types,
INT nSize)
{
UNIMPLEMENTED;
return 0;
INT ret = -1;
GdiPath *pPath;
DPRINT("Enter NtGdiGetPath\n");
DC *dc = DC_LockDc(hDC);
if(!dc)
{
DPRINT1("Can't lock dc!\n");
return -1;
}
pPath = &dc->w.path;
if(pPath->state != PATH_Closed)
{
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
goto done;
}
if(nSize==0)
{
ret = pPath->numEntriesUsed;
}
else if(nSize<pPath->numEntriesUsed)
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
goto done;
}
else
{
_SEH_TRY
{
RtlCopyMemory(Points, pPath->pPoints, sizeof(POINT)*pPath->numEntriesUsed);
RtlCopyMemory(Types, pPath->pFlags, sizeof(BYTE)*pPath->numEntriesUsed);
/* Convert the points to logical coordinates */
IntDPtoLP(dc, Points, pPath->numEntriesUsed);
ret = pPath->numEntriesUsed;
}
_SEH_HANDLE
{
SetLastNtError(_SEH_GetExceptionCode());
}
_SEH_END
}
done:
DC_UnlockDc(dc);
return ret;
}
HRGN