mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Implement SelectClipRgn() (note: this does NOT mean that clipping is
working now!) svn path=/trunk/; revision=4973
This commit is contained in:
parent
352ebc2a24
commit
c2f1fc8975
4 changed files with 86 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.27 2003/04/14 12:14:50 hyperion Exp $
|
||||
# $Id: makefile,v 1.28 2003/06/26 21:52:40 gvg Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -23,14 +23,15 @@ MAIN_OBJECTS = main/dllmain.o
|
|||
MISC_OBJECTS = misc/stubs.o misc/stubsa.o misc/stubsw.o misc/win32k.o
|
||||
|
||||
OBJECTS_OBJECTS = \
|
||||
objects/bitblt.o \
|
||||
objects/brush.o \
|
||||
objects/clip.o \
|
||||
objects/dc.o \
|
||||
objects/fillshap.o \
|
||||
objects/line.o \
|
||||
objects/pen.o \
|
||||
objects/bitblt.o \
|
||||
objects/text.o \
|
||||
objects/region.o \
|
||||
objects/brush.o \
|
||||
objects/fillshap.o
|
||||
objects/text.o
|
||||
|
||||
TARGET_OBJECTS = $(MAIN_OBJECTS) $(MISC_OBJECTS) $(OBJECTS_OBJECTS)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubs.c,v 1.19 2003/06/03 22:24:51 ekohl Exp $
|
||||
/* $Id: stubs.c,v 1.20 2003/06/26 21:52:40 gvg Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -1069,19 +1069,6 @@ SaveDC(
|
|||
|
||||
|
||||
|
||||
int
|
||||
STDCALL
|
||||
SelectClipRgn(
|
||||
HDC a0,
|
||||
HRGN a1
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
STDCALL
|
||||
ExtSelectClipRgn(
|
||||
|
|
37
reactos/lib/gdi32/objects/clip.c
Normal file
37
reactos/lib/gdi32/objects/clip.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* ReactOS GDI lib
|
||||
* Copyright (C) 2003 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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.1 2003/06/26 21:52:40 gvg Exp $
|
||||
*
|
||||
* PROJECT: ReactOS gdi32.dll
|
||||
* FILE: lib/gdi32/objects/clip.c
|
||||
* PURPOSE: Clipping functions
|
||||
* PROGRAMMER: Ge van Geldorp (ge@gse.nl)
|
||||
* UPDATE HISTORY:
|
||||
* 2003/06/26 GvG Created
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <win32k/kapi.h>
|
||||
|
||||
int
|
||||
STDCALL
|
||||
SelectClipRgn(HDC DC, HRGN Rgn)
|
||||
{
|
||||
return W32kSelectClipRgn(DC, Rgn);
|
||||
}
|
|
@ -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.15 2003/05/18 17:16:17 ea Exp $ */
|
||||
/* $Id: cliprgn.c,v 1.16 2003/06/26 21:52:40 gvg Exp $ */
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
@ -25,6 +25,7 @@
|
|||
#include <win32k/region.h>
|
||||
#include <win32k/cliprgn.h>
|
||||
#include <win32k/coord.h>
|
||||
#include <include/error.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <win32k/debug1.h>
|
||||
|
@ -169,9 +170,47 @@ BOOL STDCALL W32kSelectClipPath(HDC hDC,
|
|||
}
|
||||
|
||||
int STDCALL W32kSelectClipRgn(HDC hDC,
|
||||
HRGN hrgn)
|
||||
HRGN hRgn)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
int Type;
|
||||
PDC dc;
|
||||
HRGN Copy;
|
||||
|
||||
dc = DC_HandleToPtr(hDC);
|
||||
if (NULL == dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
if (NULL != hRgn)
|
||||
{
|
||||
Copy = W32kCreateRectRgn(0, 0, 0, 0);
|
||||
if (NULL == Copy)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
Type = W32kCombineRgn(Copy, hRgn, 0, RGN_COPY);
|
||||
if (ERROR == Type)
|
||||
{
|
||||
W32kDeleteObject(Copy);
|
||||
return ERROR;
|
||||
}
|
||||
W32kOffsetRgn(Copy, dc->w.DCOrgX, dc->w.DCOrgX);
|
||||
}
|
||||
else
|
||||
{
|
||||
Copy = NULL;
|
||||
}
|
||||
|
||||
if (NULL != dc->w.hClipRgn)
|
||||
{
|
||||
W32kDeleteObject(dc->w.hClipRgn);
|
||||
}
|
||||
dc->w.hClipRgn = Copy;
|
||||
CLIPPING_UpdateGCRegion(dc);
|
||||
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
int STDCALL W32kSetMetaRgn(HDC hDC)
|
||||
|
|
Loading…
Reference in a new issue