mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Implement OffsetViewportOrgEx()
svn path=/trunk/; revision=4765
This commit is contained in:
parent
3c0df75f7c
commit
dfe58a3a5c
4 changed files with 49 additions and 26 deletions
|
@ -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
|
||||
*
|
||||
|
@ -2125,22 +2125,6 @@ SetWindowExtEx(
|
|||
|
||||
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
OffsetViewportOrgEx(
|
||||
HDC a0,
|
||||
int a1,
|
||||
int a2,
|
||||
LPPOINT a3
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
OffsetWindowOrgEx(
|
||||
|
|
|
@ -162,6 +162,18 @@ SetViewportOrgEx(
|
|||
return W32kSetViewportOrgEx( a0, a1, a2, a3 );
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
OffsetViewportOrgEx(
|
||||
HDC DC,
|
||||
int XOffset,
|
||||
int YOffset,
|
||||
LPPOINT Point
|
||||
)
|
||||
{
|
||||
return W32kOffsetViewportOrgEx(DC, XOffset, YOffset, Point);
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
SetWindowOrgEx(
|
||||
|
|
|
@ -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.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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -315,7 +315,6 @@ PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
|
|||
{
|
||||
if ((HRGN) 1 == Window->UpdateRegion)
|
||||
{
|
||||
#if 0
|
||||
/* If no NCPAINT needed or if we're going to turn it off
|
||||
the special value 1 means the whole client rect */
|
||||
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.bottom = Window->ClientRect.bottom - Window->WindowRect.top;
|
||||
}
|
||||
#endif
|
||||
Window->UpdateRegion =
|
||||
UnsafeW32kCreateRectRgnIndirect(&Rect);
|
||||
}
|
||||
|
|
|
@ -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: 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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -32,6 +32,7 @@
|
|||
#include <internal/safe.h>
|
||||
#include <win32k/coord.h>
|
||||
#include <win32k/dc.h>
|
||||
#include <include/error.h>
|
||||
#define NDEBUG
|
||||
#include <win32k/debug1.h>
|
||||
|
||||
|
@ -259,12 +260,40 @@ W32kModifyWorldTransform(HDC hDC,
|
|||
|
||||
BOOL
|
||||
STDCALL
|
||||
W32kOffsetViewportOrgEx(HDC hDC,
|
||||
int XOffset,
|
||||
int YOffset,
|
||||
LPPOINT Point)
|
||||
W32kOffsetViewportOrgEx(HDC hDC,
|
||||
int XOffset,
|
||||
int YOffset,
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue