mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:56:00 +00:00
fixed NtGdiGetClipBox()
svn path=/trunk/; revision=6990
This commit is contained in:
parent
ce30efdf86
commit
aa1e1145d5
3 changed files with 36 additions and 7 deletions
|
@ -94,5 +94,11 @@ IntGdiPolyPolygon(DC *dc,
|
||||||
LPINT PolyCounts,
|
LPINT PolyCounts,
|
||||||
int Count);
|
int Count);
|
||||||
|
|
||||||
|
/* Rgn functions */
|
||||||
|
|
||||||
|
int FASTCALL
|
||||||
|
IntGdiGetClipBox(HDC hDC,
|
||||||
|
LPRECT rc);
|
||||||
|
|
||||||
#endif /* _WIN32K_INTGDI_H */
|
#endif /* _WIN32K_INTGDI_H */
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -49,6 +49,7 @@
|
||||||
#include <win32k/coord.h>
|
#include <win32k/coord.h>
|
||||||
#include <win32k/region.h>
|
#include <win32k/region.h>
|
||||||
#include <include/vis.h>
|
#include <include/vis.h>
|
||||||
|
#include <include/intgdi.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -766,7 +767,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs)
|
||||||
}
|
}
|
||||||
|
|
||||||
IntGetClientRect(Window, &ClientRect);
|
IntGetClientRect(Window, &ClientRect);
|
||||||
NtGdiGetClipBox(lPs->hdc, &ClipRect);
|
IntGdiGetClipBox(lPs->hdc, &ClipRect);
|
||||||
NtGdiLPtoDP(lPs->hdc, (LPPOINT)&ClipRect, 2);
|
NtGdiLPtoDP(lPs->hdc, (LPPOINT)&ClipRect, 2);
|
||||||
NtGdiIntersectRect(&lPs->rcPaint, &ClientRect, &ClipRect);
|
NtGdiIntersectRect(&lPs->rcPaint, &ClientRect, &ClipRect);
|
||||||
NtGdiDPtoLP(lPs->hdc, (LPPOINT)&lPs->rcPaint, 2);
|
NtGdiDPtoLP(lPs->hdc, (LPPOINT)&lPs->rcPaint, 2);
|
||||||
|
@ -986,13 +987,13 @@ NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll,
|
||||||
if (lprcScroll)
|
if (lprcScroll)
|
||||||
rSrc = *lprcScroll;
|
rSrc = *lprcScroll;
|
||||||
else
|
else
|
||||||
NtGdiGetClipBox(hDC, &rSrc);
|
IntGdiGetClipBox(hDC, &rSrc);
|
||||||
NtGdiLPtoDP(hDC, (LPPOINT)&rSrc, 2);
|
NtGdiLPtoDP(hDC, (LPPOINT)&rSrc, 2);
|
||||||
|
|
||||||
if (lprcClip)
|
if (lprcClip)
|
||||||
rClip = *lprcClip;
|
rClip = *lprcClip;
|
||||||
else
|
else
|
||||||
NtGdiGetClipBox(hDC, &rClip);
|
IntGdiGetClipBox(hDC, &rClip);
|
||||||
NtGdiLPtoDP(hDC, (LPPOINT)&rClip, 2);
|
NtGdiLPtoDP(hDC, (LPPOINT)&rClip, 2);
|
||||||
|
|
||||||
NtGdiIntersectRect(&rClipped_src, &rSrc, &rClip);
|
NtGdiIntersectRect(&rClipped_src, &rSrc, &rClip);
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
#include <internal/safe.h>
|
||||||
#include <win32k/dc.h>
|
#include <win32k/dc.h>
|
||||||
#include <win32k/region.h>
|
#include <win32k/region.h>
|
||||||
#include <win32k/cliprgn.h>
|
#include <win32k/cliprgn.h>
|
||||||
|
@ -157,7 +158,8 @@ int STDCALL NtGdiExtSelectClipRgn(HDC hDC,
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int STDCALL NtGdiGetClipBox(HDC hDC,
|
int FASTCALL
|
||||||
|
IntGdiGetClipBox(HDC hDC,
|
||||||
LPRECT rc)
|
LPRECT rc)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
@ -172,6 +174,26 @@ int STDCALL NtGdiGetClipBox(HDC hDC,
|
||||||
return(retval);
|
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,
|
int STDCALL NtGdiGetMetaRgn(HDC hDC,
|
||||||
HRGN hrgn)
|
HRGN hrgn)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue