fixed NtGdiGetClipBox()

svn path=/trunk/; revision=6990
This commit is contained in:
Thomas Bluemel 2003-12-13 12:12:41 +00:00
parent ce30efdf86
commit aa1e1145d5
3 changed files with 36 additions and 7 deletions

View file

@ -94,5 +94,11 @@ IntGdiPolyPolygon(DC *dc,
LPINT PolyCounts,
int Count);
/* Rgn functions */
int FASTCALL
IntGdiGetClipBox(HDC hDC,
LPRECT rc);
#endif /* _WIN32K_INTGDI_H */

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: painting.c,v 1.45 2003/12/12 18:18:21 weiden Exp $
* $Id: painting.c,v 1.46 2003/12/13 12:12:41 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -49,6 +49,7 @@
#include <win32k/coord.h>
#include <win32k/region.h>
#include <include/vis.h>
#include <include/intgdi.h>
#define NDEBUG
#include <debug.h>
@ -766,7 +767,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs)
}
IntGetClientRect(Window, &ClientRect);
NtGdiGetClipBox(lPs->hdc, &ClipRect);
IntGdiGetClipBox(lPs->hdc, &ClipRect);
NtGdiLPtoDP(lPs->hdc, (LPPOINT)&ClipRect, 2);
NtGdiIntersectRect(&lPs->rcPaint, &ClientRect, &ClipRect);
NtGdiDPtoLP(lPs->hdc, (LPPOINT)&lPs->rcPaint, 2);
@ -986,13 +987,13 @@ NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll,
if (lprcScroll)
rSrc = *lprcScroll;
else
NtGdiGetClipBox(hDC, &rSrc);
IntGdiGetClipBox(hDC, &rSrc);
NtGdiLPtoDP(hDC, (LPPOINT)&rSrc, 2);
if (lprcClip)
rClip = *lprcClip;
else
NtGdiGetClipBox(hDC, &rClip);
IntGdiGetClipBox(hDC, &rClip);
NtGdiLPtoDP(hDC, (LPPOINT)&rClip, 2);
NtGdiIntersectRect(&rClipped_src, &rSrc, &rClip);

View file

@ -16,11 +16,12 @@
* 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.26 2003/11/26 21:48:35 gvg Exp $ */
/* $Id: cliprgn.c,v 1.27 2003/12/13 12:12:41 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ddk/ntddk.h>
#include <internal/safe.h>
#include <win32k/dc.h>
#include <win32k/region.h>
#include <win32k/cliprgn.h>
@ -157,8 +158,9 @@ int STDCALL NtGdiExtSelectClipRgn(HDC hDC,
UNIMPLEMENTED;
}
int STDCALL NtGdiGetClipBox(HDC hDC,
LPRECT rc)
int FASTCALL
IntGdiGetClipBox(HDC hDC,
LPRECT rc)
{
int retval;
DC *dc;
@ -172,6 +174,26 @@ int STDCALL NtGdiGetClipBox(HDC hDC,
return(retval);
}
int STDCALL NtGdiGetClipBox(HDC hDC,
LPRECT rc)
{
int Ret;
NTSTATUS Status;
RECT Saferect;
Ret = IntGdiGetClipBox(hDC, &Saferect);
Status = MmCopyToCaller(rc, &Saferect, sizeof(RECT));
if(!NT_SUCCESS(Status))
{
SetLastNtError(Status);
return ERROR;
}
return Ret;
}
int STDCALL NtGdiGetMetaRgn(HDC hDC,
HRGN hrgn)
{