mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 12:18:13 +00:00
Removed NtGdi rect calls.
svn path=/trunk/; revision=33722
This commit is contained in:
parent
d8b3f39eef
commit
950f7264b3
|
@ -31,69 +31,12 @@ IntGdiSetEmptyRect(PRECT Rect)
|
|||
Rect->left = Rect->right = Rect->top = Rect->bottom = 0;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtGdiSetEmptyRect(PRECT UnsafeRect)
|
||||
{
|
||||
RECT Rect;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
IntGdiSetEmptyRect(&Rect);
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(UnsafeRect,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
*UnsafeRect = Rect;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
IntGdiIsEmptyRect(const RECT* Rect)
|
||||
{
|
||||
return(Rect->left >= Rect->right || Rect->top >= Rect->bottom);
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtGdiIsEmptyRect(const RECT* UnsafeRect)
|
||||
{
|
||||
RECT Rect = {0};
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(UnsafeRect,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
Rect = *UnsafeRect;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return IntGdiIsEmptyRect(&Rect);
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
IntGdiOffsetRect(LPRECT Rect, INT x, INT y)
|
||||
{
|
||||
|
@ -103,53 +46,6 @@ IntGdiOffsetRect(LPRECT Rect, INT x, INT y)
|
|||
Rect->bottom += y;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtGdiOffsetRect(LPRECT UnsafeRect, INT x, INT y)
|
||||
{
|
||||
RECT Rect = {0};
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(UnsafeRect,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
Rect = *UnsafeRect;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
IntGdiOffsetRect(&Rect, x, y);
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(UnsafeRect,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
*UnsafeRect = Rect;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
IntGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
|
||||
{
|
||||
|
@ -183,61 +79,6 @@ IntGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtGdiUnionRect(PRECT UnsafeDest, const RECT* UnsafeSrc1, const RECT* UnsafeSrc2)
|
||||
{
|
||||
RECT Dest, Src1 = {0}, Src2 = {0};
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
BOOL Ret;
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(UnsafeSrc1,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
ProbeForRead(UnsafeSrc2,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
Src1 = *UnsafeSrc1;
|
||||
Src2 = *UnsafeSrc2;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Ret = IntGdiUnionRect(&Dest, &Src1, &Src2);
|
||||
|
||||
if (Ret)
|
||||
{
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(UnsafeDest,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
*UnsafeDest = Dest;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
IntGdiSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom)
|
||||
{
|
||||
|
@ -247,35 +88,6 @@ IntGdiSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom)
|
|||
Rect->bottom = bottom;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtGdiSetRect(PRECT UnsafeRect, INT left, INT top, INT right, INT bottom)
|
||||
{
|
||||
RECT Rect;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
IntGdiSetRect(&Rect, left, top, right, bottom);
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(UnsafeRect,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
*UnsafeRect = Rect;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
IntGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
|
||||
{
|
||||
|
@ -295,59 +107,5 @@ IntGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtGdiIntersectRect(PRECT UnsafeDest, const RECT* UnsafeSrc1, const RECT* UnsafeSrc2)
|
||||
{
|
||||
RECT Dest, Src1, Src2 = {0};
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
BOOL Ret;
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(UnsafeSrc1,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
ProbeForRead(UnsafeSrc2,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
Src1 = *UnsafeSrc1;
|
||||
Src2 = *UnsafeSrc2;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Ret = IntGdiIntersectRect(&Dest, &Src2, &Src2);
|
||||
|
||||
if (Ret)
|
||||
{
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(UnsafeDest,
|
||||
sizeof(RECT),
|
||||
1);
|
||||
*UnsafeDest = Dest;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue