mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
Implement NtGdiGetPath (based on wine)
svn path=/trunk/; revision=24004
This commit is contained in:
parent
0f51b5f0bc
commit
70a18c5a4e
1 changed files with 56 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue