10 modified files
reactos/include/win32k
diff -u -r1.21 -r1.22
--- region.h 9 Apr 2004 20:03:11 -0000 1.21
+++ region.h 24 Apr 2004 14:21:35 -0000 1.22
@@ -151,12 +151,5 @@
NtGdiGetRegionData(HRGN hrgn,
DWORD count,
LPRGNDATA rgndata);
-
-HRGN STDCALL REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt);
-
-HRGN FASTCALL UnsafeIntCreateRectRgnIndirect(CONST PRECT rc);
-INT FASTCALL UnsafeIntGetRgnBox(PROSRGNDATA Rgn, LPRECT pRect);
-VOID FASTCALL UnsafeIntUnionRectWithRgn(PROSRGNDATA RgnDest, CONST PRECT Rect);
-BOOL FASTCALL UnsafeIntRectInRegion(PROSRGNDATA Rgn, CONST LPRECT rc);
#endif
reactos/lib/gdi32/misc
diff -u -r1.53 -r1.54
--- stubs.c 23 Apr 2004 13:34:04 -0000 1.53
+++ stubs.c 24 Apr 2004 14:21:36 -0000 1.54
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.53 2004/04/23 13:34:04 weiden Exp $
+/* $Id: stubs.c,v 1.54 2004/04/24 14:21:36 weiden Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@@ -209,23 +209,6 @@
return 0;
}
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-FrameRgn(
- HDC a0,
- HRGN a1,
- HBRUSH a2,
- int a3,
- int a4
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
/*
* @unimplemented
reactos/lib/gdi32/objects
diff -u -r1.12 -r1.13
--- region.c 23 Apr 2004 13:34:04 -0000 1.12
+++ region.c 24 Apr 2004 14:21:36 -0000 1.13
@@ -309,3 +309,19 @@
{
return NtGdiInvertRgn(hDc, hRgn);
}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+FrameRgn(
+ HDC hdc,
+ HRGN hrgn,
+ HBRUSH hbr,
+ int nWidth,
+ int nHeight
+ )
+{
+ return NtGdiFrameRgn(hdc, hrgn, hbr, nWidth, nHeight);
+}
reactos/subsys/win32k/include
diff -u -r1.10 -r1.11
--- intgdi.h 9 Apr 2004 20:03:18 -0000 1.10
+++ intgdi.h 24 Apr 2004 14:21:36 -0000 1.11
@@ -100,6 +100,13 @@
IntGdiGetClipBox(HDC hDC,
LPRECT rc);
+HRGN FASTCALL REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt);
+
+HRGN FASTCALL UnsafeIntCreateRectRgnIndirect(CONST PRECT rc);
+INT FASTCALL UnsafeIntGetRgnBox(PROSRGNDATA Rgn, LPRECT pRect);
+VOID FASTCALL UnsafeIntUnionRectWithRgn(PROSRGNDATA RgnDest, CONST PRECT Rect);
+BOOL FASTCALL UnsafeIntRectInRegion(PROSRGNDATA Rgn, CONST LPRECT rc);
+
/* DC functions */
BOOL FASTCALL
reactos/subsys/win32k/ntuser
diff -u -r1.26 -r1.27
--- vis.c 27 Mar 2004 15:16:05 -0000 1.26
+++ vis.c 24 Apr 2004 14:21:36 -0000 1.27
@@ -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: vis.c,v 1.26 2004/03/27 15:16:05 gvg Exp $
+ * $Id: vis.c,v 1.27 2004/04/24 14:21:36 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -29,6 +29,7 @@
#include <include/painting.h>
#include <include/rect.h>
#include <include/vis.h>
+#include <include/intgdi.h>
#define NDEBUG
#include <win32k/debug1.h>
reactos/subsys/win32k/ntuser
diff -u -r1.219 -r1.220
--- window.c 17 Apr 2004 11:00:14 -0000 1.219
+++ window.c 24 Apr 2004 14:21:36 -0000 1.220
@@ -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: window.c,v 1.219 2004/04/17 11:00:14 weiden Exp $
+/* $Id: window.c,v 1.220 2004/04/24 14:21:36 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -46,7 +46,7 @@
#include <include/paint.h>
#include <include/painting.h>
#include <include/scroll.h>
-#include <include/vis.h>
+#include <include/intgdi.h>
#include <include/menu.h>
#include <include/hotkey.h>
#include <include/focus.h>
reactos/subsys/win32k/ntuser
diff -u -r1.111 -r1.112
--- winpos.c 14 Apr 2004 17:19:38 -0000 1.111
+++ winpos.c 24 Apr 2004 14:21:36 -0000 1.112
@@ -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: winpos.c,v 1.111 2004/04/14 17:19:38 weiden Exp $
+/* $Id: winpos.c,v 1.112 2004/04/24 14:21:36 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -44,6 +44,7 @@
#include <include/painting.h>
#include <include/dce.h>
#include <include/vis.h>
+#include <include/intgdi.h>
#include <include/focus.h>
#include <include/tags.h>
reactos/subsys/win32k/objects
diff -u -r1.31 -r1.32
--- cliprgn.c 9 Apr 2004 20:03:20 -0000 1.31
+++ cliprgn.c 24 Apr 2004 14:21:37 -0000 1.32
@@ -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.31 2004/04/09 20:03:20 navaraf Exp $ */
+/* $Id: cliprgn.c,v 1.32 2004/04/24 14:21:37 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -27,6 +27,7 @@
#include <win32k/cliprgn.h>
#include <win32k/coord.h>
#include <include/error.h>
+#include <include/intgdi.h>
#include "../eng/clip.h"
#define NDEBUG
reactos/subsys/win32k/objects
diff -u -r1.19 -r1.20
--- path.c 5 Apr 2004 21:26:25 -0000 1.19
+++ path.c 24 Apr 2004 14:21:37 -0000 1.20
@@ -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: path.c,v 1.19 2004/04/05 21:26:25 navaraf Exp $ */
+/* $Id: path.c,v 1.20 2004/04/24 14:21:37 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ddk/ntddk.h>
@@ -31,7 +31,6 @@
#define _WIN32K_PATH_INTERNAL
#include <include/object.h>
#include <include/path.h>
-#include <include/intgdi.h>
#include <include/tags.h>
#include <math.h>
@@ -45,6 +44,8 @@
#define GROW_FACTOR_DENOM 1 /* Denominator of grow factor */
+INT FASTCALL
+IntGdiGetArcDirection(DC *dc);
BOOL
STDCALL
reactos/subsys/win32k/objects
diff -u -r1.49 -r1.50
--- region.c 23 Apr 2004 13:34:04 -0000 1.49
+++ region.c 24 Apr 2004 14:21:37 -0000 1.50
@@ -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: region.c,v 1.49 2004/04/23 13:34:04 weiden Exp $ */
+/* $Id: region.c,v 1.50 2004/04/24 14:21:37 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ddk/ntddk.h>
@@ -30,6 +30,7 @@
#include <include/rect.h>
#include <include/object.h>
#include <include/inteng.h>
+#include <include/intgdi.h>
#include <include/error.h>
#include <include/tags.h>
@@ -103,6 +104,7 @@
struct _POINTBLOCK *next;
} POINTBLOCK;
+#ifndef NDEBUG
/*
* This function is left there for debugging purposes.
*/
@@ -129,6 +131,7 @@
RGNDATA_UnlockRgn(hRgn);
}
+#endif /* NDEBUG */
static BOOL FASTCALL REGION_CopyRegion(PROSRGNDATA dst, PROSRGNDATA src)
{
@@ -365,7 +368,7 @@
*
* \return hDst if success, 0 otherwise.
*/
-HRGN STDCALL REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt)
+HRGN FASTCALL REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt)
{
PROSRGNDATA objSrc, rgnDst;
HRGN hNewDst, hRet = NULL;
@@ -1413,7 +1416,99 @@
}
-BOOL STDCALL REGION_LPTODP(HDC hdc, HRGN hDest, HRGN hSrc)
+BOOL FASTCALL REGION_CreateFrameRgn(HRGN hDest, HRGN hSrc, INT x, INT y)
+{
+ PROSRGNDATA srcObj, destObj;
+ PRECT rc;
+ INT dx, dy;
+ ULONG i;
+
+ if(!(srcObj = (PROSRGNDATA)RGNDATA_LockRgn(hSrc)))
+ {
+ return FALSE;
+ }
+ if(!REGION_NOT_EMPTY(srcObj))
+ {
+ RGNDATA_UnlockRgn(hSrc);
+ return FALSE;
+ }
+ if(!(destObj = (PROSRGNDATA)RGNDATA_LockRgn(hDest)))
+ {
+ RGNDATA_UnlockRgn(hSrc);
+ return FALSE;
+ }
+
+ EMPTY_REGION(destObj);
+ if(!REGION_CopyRegion(destObj, srcObj))
+ {
+ RGNDATA_UnlockRgn(hDest);
+ RGNDATA_UnlockRgn(hSrc);
+ return FALSE;
+ }
+
+ /* left-top */
+ dx = x * 2;
+ dy = y * 2;
+ rc = (PRECT)srcObj->Buffer;
+ for(i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left += x;
+ rc->top += y;
+ rc->right += x;
+ rc->bottom += y;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
+
+ /* right-top */
+ rc = (PRECT)srcObj->Buffer;
+ for(i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left -= dx;
+ rc->right -= dx;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
+
+ /* right-bottom */
+ rc = (PRECT)srcObj->Buffer;
+ for(i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->top -= dy;
+ rc->bottom -= dy;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
+
+ /* left-bottom */
+ rc = (PRECT)srcObj->Buffer;
+ for(i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left += dx;
+ rc->right += dx;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
+
+
+ rc = (PRECT)srcObj->Buffer;
+ for(i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left -= x;
+ rc->top += y;
+ rc->right -= x;
+ rc->bottom += y;
+ rc++;
+ }
+ REGION_SubtractRegion(destObj, srcObj, destObj);
+
+ RGNDATA_UnlockRgn(hDest);
+ RGNDATA_UnlockRgn(hSrc);
+ return TRUE;
+}
+
+
+BOOL FASTCALL REGION_LPTODP(HDC hdc, HRGN hDest, HRGN hSrc)
{
RECT *pCurRect, *pEndRect;
PROSRGNDATA srcObj = NULL;
@@ -1893,13 +1988,25 @@
BOOL
STDCALL
-NtGdiFrameRgn(HDC hDC,
- HRGN hRgn,
- HBRUSH hBrush,
- INT Width,
- INT Height)
+NtGdiFrameRgn(HDC hDC, HRGN hRgn, HBRUSH hBrush, INT Width, INT Height)
{
- UNIMPLEMENTED;
+ HRGN FrameRgn;
+ BOOL Ret;
+
+ if(!(FrameRgn = NtGdiCreateRectRgn(0, 0, 0, 0)))
+ {
+ return FALSE;
+ }
+ if(!REGION_CreateFrameRgn(FrameRgn, hRgn, Width, Height))
+ {
+ NtGdiDeleteObject(FrameRgn);
+ return FALSE;
+ }
+
+ Ret = NtGdiFillRgn(hDC, FrameRgn, hBrush);
+
+ NtGdiDeleteObject(FrameRgn);
+ return Ret;
}
INT FASTCALL
CVSspam 0.2.8