Implement OffsetViewportOrgEx()

svn path=/trunk/; revision=4765
This commit is contained in:
Gé van Geldorp 2003-05-27 07:23:05 +00:00
parent 3c0df75f7c
commit dfe58a3a5c
4 changed files with 49 additions and 26 deletions

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.17 2003/05/03 13:39:06 gvg Exp $ /* $Id: stubs.c,v 1.18 2003/05/27 07:23:04 gvg Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -2125,22 +2125,6 @@ SetWindowExtEx(
BOOL
STDCALL
OffsetViewportOrgEx(
HDC a0,
int a1,
int a2,
LPPOINT a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
BOOL BOOL
STDCALL STDCALL
OffsetWindowOrgEx( OffsetWindowOrgEx(

View file

@ -162,6 +162,18 @@ SetViewportOrgEx(
return W32kSetViewportOrgEx( a0, a1, a2, a3 ); return W32kSetViewportOrgEx( a0, a1, a2, a3 );
} }
BOOL
STDCALL
OffsetViewportOrgEx(
HDC DC,
int XOffset,
int YOffset,
LPPOINT Point
)
{
return W32kOffsetViewportOrgEx(DC, XOffset, YOffset, Point);
}
BOOL BOOL
STDCALL STDCALL
SetWindowOrgEx( SetWindowOrgEx(

View file

@ -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.15 2003/05/26 18:52:37 gvg Exp $ /* $Id: painting.c,v 1.16 2003/05/27 07:23:05 gvg Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -315,7 +315,6 @@ PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
{ {
if ((HRGN) 1 == Window->UpdateRegion) if ((HRGN) 1 == Window->UpdateRegion)
{ {
#if 0
/* If no NCPAINT needed or if we're going to turn it off /* If no NCPAINT needed or if we're going to turn it off
the special value 1 means the whole client rect */ the special value 1 means the whole client rect */
if (0 == (Window->Flags & WINDOWOBJECT_NEED_NCPAINT) || if (0 == (Window->Flags & WINDOWOBJECT_NEED_NCPAINT) ||
@ -326,7 +325,6 @@ PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
Rect.right = Window->ClientRect.right - Window->WindowRect.left; Rect.right = Window->ClientRect.right - Window->WindowRect.left;
Rect.bottom = Window->ClientRect.bottom - Window->WindowRect.top; Rect.bottom = Window->ClientRect.bottom - Window->WindowRect.top;
} }
#endif
Window->UpdateRegion = Window->UpdateRegion =
UnsafeW32kCreateRectRgnIndirect(&Rect); UnsafeW32kCreateRectRgnIndirect(&Rect);
} }

View file

@ -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: coord.c,v 1.11 2003/05/18 17:16:18 ea Exp $ /* $Id: coord.c,v 1.12 2003/05/27 07:23:05 gvg Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -32,6 +32,7 @@
#include <internal/safe.h> #include <internal/safe.h>
#include <win32k/coord.h> #include <win32k/coord.h>
#include <win32k/dc.h> #include <win32k/dc.h>
#include <include/error.h>
#define NDEBUG #define NDEBUG
#include <win32k/debug1.h> #include <win32k/debug1.h>
@ -262,9 +263,37 @@ STDCALL
W32kOffsetViewportOrgEx(HDC hDC, W32kOffsetViewportOrgEx(HDC hDC,
int XOffset, int XOffset,
int YOffset, int YOffset,
LPPOINT Point) LPPOINT UnsafePoint)
{ {
UNIMPLEMENTED; DC *dc = DC_HandleToPtr(hDC);
POINT Point;
NTSTATUS Status;
if (NULL == dc)
{
return FALSE;
}
if (NULL != UnsafePoint)
{
Point.x = dc->vportOrgX;
Point.y = dc->vportOrgY;
Status = MmCopyToCaller(UnsafePoint, &Point, sizeof(POINT));
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return FALSE;
}
}
dc->vportOrgX += XOffset;
dc->vportOrgY += YOffset;
DC_UpdateXforms(dc);
dc->w.DCOrgX += XOffset;
dc->w.DCOrgY += YOffset;
return TRUE;
} }
BOOL BOOL