mirror of
https://github.com/reactos/reactos.git
synced 2024-07-16 17:36:12 +00:00
- Removed NtGdiLPTODP/DPTOLP from w32ksvc.db and updated ntgdibad.h.
- Connected the gdi32 parts. svn path=/trunk/; revision=28270
This commit is contained in:
parent
1ed0850348
commit
be5bce8b2a
|
@ -89,7 +89,7 @@ CreateRoundRectRgn@24=NtGdiCreateRoundRectRgn@24
|
||||||
CreateScalableFontResourceA@16
|
CreateScalableFontResourceA@16
|
||||||
CreateScalableFontResourceW@16
|
CreateScalableFontResourceW@16
|
||||||
CreateSolidBrush@4
|
CreateSolidBrush@4
|
||||||
DPtoLP@12=NtGdiDPtoLP@12
|
DPtoLP@12
|
||||||
DeleteColorSpace@4
|
DeleteColorSpace@4
|
||||||
DeleteDC@4=NtGdiDeleteObjectApp@4
|
DeleteDC@4=NtGdiDeleteObjectApp@4
|
||||||
DeleteEnhMetaFile@4
|
DeleteEnhMetaFile@4
|
||||||
|
@ -464,7 +464,7 @@ HT_Get8BPPFormatPalette@16
|
||||||
HT_Get8BPPMaskPalette@24
|
HT_Get8BPPMaskPalette@24
|
||||||
IntersectClipRect@20=NtGdiIntersectClipRect@20
|
IntersectClipRect@20=NtGdiIntersectClipRect@20
|
||||||
InvertRgn@8=NtGdiInvertRgn@8
|
InvertRgn@8=NtGdiInvertRgn@8
|
||||||
LPtoDP@12=NtGdiLPtoDP@12
|
LPtoDP@12
|
||||||
LineDDA@24
|
LineDDA@24
|
||||||
LineTo@12=NtGdiLineTo@12
|
LineTo@12=NtGdiLineTo@12
|
||||||
MaskBlt@48
|
MaskBlt@48
|
||||||
|
|
|
@ -103,7 +103,7 @@ DPtoLP ( HDC hDC, LPPOINT Points, INT Count )
|
||||||
PAGE_EXTENTS_CHANGED | // do processing in kernel space.
|
PAGE_EXTENTS_CHANGED | // do processing in kernel space.
|
||||||
WORLD_XFORM_CHANGED )
|
WORLD_XFORM_CHANGED )
|
||||||
#endif
|
#endif
|
||||||
return NtGdiTransformPoints( hDC, Points, Points, Count, 0); // Last is 0 or 2
|
return NtGdiTransformPoints( hDC, Points, Points, Count, GdiDpToLp); // DPtoLP mode.
|
||||||
#if 0
|
#if 0
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -129,7 +129,7 @@ LPtoDP ( HDC hDC, LPPOINT Points, INT Count )
|
||||||
PAGE_EXTENTS_CHANGED |
|
PAGE_EXTENTS_CHANGED |
|
||||||
WORLD_XFORM_CHANGED )
|
WORLD_XFORM_CHANGED )
|
||||||
#endif
|
#endif
|
||||||
return NtGdiTransformPoints( hDC, Points, Points, Count, 0);
|
return NtGdiTransformPoints( hDC, Points, Points, Count, GdiLpToDp); // LPtoDP mode
|
||||||
#if 0
|
#if 0
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -184,15 +184,6 @@ NtGdiCreatePolyPolygonRgn(CONST PPOINT pt,
|
||||||
INT Count,
|
INT Count,
|
||||||
INT PolyFillMode);
|
INT PolyFillMode);
|
||||||
|
|
||||||
/* Use NtGdiTransformPoints with GdiDpToLp. */
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
NtGdiDPtoLP (
|
|
||||||
HDC hDC,
|
|
||||||
LPPOINT Points,
|
|
||||||
int Count
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Meta are user-mode. */
|
/* Meta are user-mode. */
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
|
@ -495,15 +486,6 @@ NtGdiGetWorldTransform (
|
||||||
LPXFORM Xform
|
LPXFORM Xform
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Use NtGdiTransformPoints with GdiDpToLp */
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
NtGdiLPtoDP (
|
|
||||||
HDC hDC,
|
|
||||||
LPPOINT Points,
|
|
||||||
int Count
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Needs to be done in user-mode. */
|
/* Needs to be done in user-mode. */
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -157,99 +157,6 @@ IntDPtoLP ( PDC dc, LPPOINT Points, INT Count )
|
||||||
CoordDPtoLP ( dc, &Points[i] );
|
CoordDPtoLP ( dc, &Points[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* Converts points from device coordinates into logical coordinates. Conversion depends on the mapping mode,
|
|
||||||
* world transfrom, viewport origin settings for the given device context.
|
|
||||||
* \param hDC device context.
|
|
||||||
* \param Points an array of POINT structures (in/out).
|
|
||||||
* \param Count number of elements in the array of POINT structures.
|
|
||||||
* \return TRUE if success.
|
|
||||||
*/
|
|
||||||
BOOL STDCALL
|
|
||||||
NtGdiDPtoLP(HDC hDC,
|
|
||||||
LPPOINT UnsafePoints,
|
|
||||||
int Count)
|
|
||||||
{
|
|
||||||
PDC dc;
|
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
|
||||||
LPPOINT Points;
|
|
||||||
ULONG Size;
|
|
||||||
|
|
||||||
dc = DC_LockDc(hDC);
|
|
||||||
if (!dc)
|
|
||||||
{
|
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!UnsafePoints || Count <= 0)
|
|
||||||
{
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Size = Count * sizeof(POINT);
|
|
||||||
|
|
||||||
Points = (LPPOINT)ExAllocatePoolWithTag(PagedPool, Size, TAG_COORD);
|
|
||||||
if(!Points)
|
|
||||||
{
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
_SEH_TRY
|
|
||||||
{
|
|
||||||
ProbeForWrite(UnsafePoints,
|
|
||||||
Size,
|
|
||||||
1);
|
|
||||||
RtlCopyMemory(Points,
|
|
||||||
UnsafePoints,
|
|
||||||
Size);
|
|
||||||
}
|
|
||||||
_SEH_HANDLE
|
|
||||||
{
|
|
||||||
Status = _SEH_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH_END;
|
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
ExFreePool(Points);
|
|
||||||
SetLastNtError(Status);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
IntDPtoLP(dc, Points, Count);
|
|
||||||
|
|
||||||
_SEH_TRY
|
|
||||||
{
|
|
||||||
/* pointer was already probed! */
|
|
||||||
RtlCopyMemory(UnsafePoints,
|
|
||||||
Points,
|
|
||||||
Size);
|
|
||||||
}
|
|
||||||
_SEH_HANDLE
|
|
||||||
{
|
|
||||||
Status = _SEH_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH_END;
|
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
ExFreePool(Points);
|
|
||||||
SetLastNtError(Status);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
ExFreePool(Points);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGetGraphicsMode ( PDC dc )
|
IntGetGraphicsMode ( PDC dc )
|
||||||
|
@ -390,8 +297,13 @@ IntLPtoDP ( PDC dc, LPPOINT Points, INT Count )
|
||||||
* \param Count number of elements in the array of POINT structures.
|
* \param Count number of elements in the array of POINT structures.
|
||||||
* \return TRUE if success.
|
* \return TRUE if success.
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL
|
||||||
NtGdiLPtoDP ( HDC hDC, LPPOINT UnsafePoints, INT Count )
|
APIENTRY
|
||||||
|
NtGdiTransformPoints( HDC hDC,
|
||||||
|
PPOINT UnsafePtsIn,
|
||||||
|
PPOINT UnsafePtOut,
|
||||||
|
INT Count,
|
||||||
|
INT iMode )
|
||||||
{
|
{
|
||||||
PDC dc;
|
PDC dc;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
@ -405,7 +317,7 @@ NtGdiLPtoDP ( HDC hDC, LPPOINT UnsafePoints, INT Count )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UnsafePoints || Count <= 0)
|
if (!UnsafePtsIn || !UnsafePtOut || Count <= 0)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
|
@ -424,11 +336,14 @@ NtGdiLPtoDP ( HDC hDC, LPPOINT UnsafePoints, INT Count )
|
||||||
|
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
ProbeForWrite(UnsafePoints,
|
ProbeForWrite(UnsafePtOut,
|
||||||
|
Size,
|
||||||
|
1);
|
||||||
|
ProbeForRead(UnsafePtsIn,
|
||||||
Size,
|
Size,
|
||||||
1);
|
1);
|
||||||
RtlCopyMemory(Points,
|
RtlCopyMemory(Points,
|
||||||
UnsafePoints,
|
UnsafePtsIn,
|
||||||
Size);
|
Size);
|
||||||
}
|
}
|
||||||
_SEH_HANDLE
|
_SEH_HANDLE
|
||||||
|
@ -445,12 +360,28 @@ NtGdiLPtoDP ( HDC hDC, LPPOINT UnsafePoints, INT Count )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (iMode)
|
||||||
|
{
|
||||||
|
case GdiDpToLp:
|
||||||
|
IntDPtoLP(dc, Points, Count);
|
||||||
|
break;
|
||||||
|
case GdiLpToDp:
|
||||||
IntLPtoDP(dc, Points, Count);
|
IntLPtoDP(dc, Points, Count);
|
||||||
|
break;
|
||||||
|
case 2: // Not supported yet. Need testing.
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
DC_UnlockDc(dc);
|
||||||
|
ExFreePool(Points);
|
||||||
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
/* pointer was already probed! */
|
/* pointer was already probed! */
|
||||||
RtlCopyMemory(UnsafePoints,
|
RtlCopyMemory(UnsafePtOut,
|
||||||
Points,
|
Points,
|
||||||
Size);
|
Size);
|
||||||
}
|
}
|
||||||
|
@ -473,19 +404,6 @@ NtGdiLPtoDP ( HDC hDC, LPPOINT UnsafePoints, INT Count )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL
|
|
||||||
APIENTRY
|
|
||||||
NtGdiTransformPoints( HDC hdc,
|
|
||||||
PPOINT UnsafePtsIn,
|
|
||||||
PPOINT UnsafePtOut,
|
|
||||||
INT Count,
|
|
||||||
INT iMode )
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
NtGdiModifyWorldTransform(HDC hDC,
|
NtGdiModifyWorldTransform(HDC hDC,
|
||||||
|
|
|
@ -770,7 +770,6 @@ NtGdiCreatePalette 1
|
||||||
NtGdiCreatePolygonRgn 3
|
NtGdiCreatePolygonRgn 3
|
||||||
NtGdiCreatePolyPolygonRgn 4
|
NtGdiCreatePolyPolygonRgn 4
|
||||||
NtGdiCreateScalableFontResource 4
|
NtGdiCreateScalableFontResource 4
|
||||||
NtGdiDPtoLP 3
|
|
||||||
NtGdiDeleteEnhMetaFile 1
|
NtGdiDeleteEnhMetaFile 1
|
||||||
NtGdiDeleteObject 1
|
NtGdiDeleteObject 1
|
||||||
NtGdiEnumEnhMetaFile 5
|
NtGdiEnumEnhMetaFile 5
|
||||||
|
@ -816,7 +815,6 @@ NtGdiGetTextAlign 1
|
||||||
NtGdiGetTextColor 1
|
NtGdiGetTextColor 1
|
||||||
NtGdiGetTextExtentPoint32 4
|
NtGdiGetTextExtentPoint32 4
|
||||||
NtGdiGetWorldTransform 2
|
NtGdiGetWorldTransform 2
|
||||||
NtGdiLPtoDP 3
|
|
||||||
NtGdiMoveToEx 4
|
NtGdiMoveToEx 4
|
||||||
NtGdiOffsetViewportOrgEx 4
|
NtGdiOffsetViewportOrgEx 4
|
||||||
NtGdiOffsetWindowOrgEx 4
|
NtGdiOffsetWindowOrgEx 4
|
||||||
|
|
Loading…
Reference in a new issue