implemented ExcludeClipRect()

svn path=/trunk/; revision=9219
This commit is contained in:
Thomas Bluemel 2004-04-25 16:06:20 +00:00
parent 6a433d3812
commit d69e5f4dee
3 changed files with 65 additions and 31 deletions

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.57 2004/04/25 15:52:31 weiden Exp $
/* $Id: stubs.c,v 1.58 2004/04/25 16:06:20 weiden Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@ -176,24 +176,6 @@ Escape(
}
/*
* @unimplemented
*/
int
STDCALL
ExcludeClipRect(
HDC a0,
int a1,
int a2,
int a3,
int a4
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: clip.c,v 1.5 2004/04/25 14:46:54 weiden Exp $
/* $Id: clip.c,v 1.6 2004/04/25 16:06:20 weiden Exp $
*
* PROJECT: ReactOS gdi32.dll
* FILE: lib/gdi32/objects/clip.c
@ -55,4 +55,18 @@ IntersectClipRect(
return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
}
/*
* @implemented
*/
int
STDCALL
ExcludeClipRect(
HDC hdc,
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect
)
{
return NtGdiExcludeClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
}

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: cliprgn.c,v 1.33 2004/04/25 15:52:31 weiden Exp $ */
/* $Id: cliprgn.c,v 1.34 2004/04/25 16:06:20 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
@ -149,15 +149,6 @@ NtGdiSelectVisRgn(HDC hdc, HRGN hrgn)
return retval;
}
int STDCALL NtGdiExcludeClipRect(HDC hDC,
int LeftRect,
int TopRect,
int RightRect,
int BottomRect)
{
UNIMPLEMENTED;
}
int STDCALL NtGdiExtSelectClipRgn(HDC hDC,
HRGN hrgn,
int fnMode)
@ -217,6 +208,53 @@ int STDCALL NtGdiGetMetaRgn(HDC hDC,
UNIMPLEMENTED;
}
int STDCALL NtGdiExcludeClipRect(HDC hDC,
int LeftRect,
int TopRect,
int RightRect,
int BottomRect)
{
INT Result;
RECT Rect;
HRGN NewRgn;
PDC dc = DC_LockDc(hDC);
if (!dc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return ERROR;
}
Rect.left = LeftRect;
Rect.top = TopRect;
Rect.right = RightRect;
Rect.bottom = BottomRect;
IntLPtoDP(dc, (LPPOINT)&Rect, 2);
NewRgn = UnsafeIntCreateRectRgnIndirect(&Rect);
if (!NewRgn)
{
Result = ERROR;
}
else if (!dc->w.hClipRgn)
{
dc->w.hClipRgn = NewRgn;
Result = SIMPLEREGION;
}
else
{
Result = NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hClipRgn, NewRgn, RGN_DIFF);
NtGdiDeleteObject(NewRgn);
}
if (Result != ERROR)
CLIPPING_UpdateGCRegion(dc);
DC_UnlockDc(hDC);
return Result;
}
int STDCALL NtGdiIntersectClipRect(HDC hDC,
int LeftRect,
int TopRect,