Commit in reactos on MAIN
lib/gdi32/misc/stubs.c+1-191.57 -> 1.58
lib/gdi32/objects/clip.c+16-21.5 -> 1.6
subsys/win32k/objects/cliprgn.c+48-101.33 -> 1.34
+65-31
3 modified files
implemented ExcludeClipRect()

reactos/lib/gdi32/misc
stubs.c 1.57 -> 1.58
diff -u -r1.57 -r1.58
--- stubs.c	25 Apr 2004 15:52:31 -0000	1.57
+++ stubs.c	25 Apr 2004 16:06:20 -0000	1.58
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.57 2004/04/25 15:52:31 weiden Exp $
+/* $Id: stubs.c,v 1.58 2004/04/25 16:06:20 weiden Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -179,24 +179,6 @@
 /*
  * @unimplemented
  */
-int
-STDCALL
-ExcludeClipRect(
-	HDC	a0,
-	int	a1,
-	int	a2,
-	int	a3,
-	int	a4
-	)
-{
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-
-/*
- * @unimplemented
- */
 HRGN
 STDCALL
 ExtCreateRegion(

reactos/lib/gdi32/objects
clip.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- clip.c	25 Apr 2004 14:46:54 -0000	1.5
+++ clip.c	25 Apr 2004 16:06:20 -0000	1.6
@@ -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: clip.c,v 1.5 2004/04/25 14:46:54 weiden Exp $
+/* $Id: clip.c,v 1.6 2004/04/25 16:06:20 weiden Exp $
  *
  * PROJECT:         ReactOS gdi32.dll
  * FILE:            lib/gdi32/objects/clip.c
@@ -55,4 +55,18 @@
   return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
 }
 
-
+/*
+ * @implemented
+ */
+int
+STDCALL
+ExcludeClipRect(
+	HDC		hdc,
+	int		nLeftRect,
+	int		nTopRect,
+	int		nRightRect,
+	int		nBottomRect
+	)
+{
+  return NtGdiExcludeClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
+}

reactos/subsys/win32k/objects
cliprgn.c 1.33 -> 1.34
diff -u -r1.33 -r1.34
--- cliprgn.c	25 Apr 2004 15:52:31 -0000	1.33
+++ cliprgn.c	25 Apr 2004 16:06:20 -0000	1.34
@@ -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.33 2004/04/25 15:52:31 weiden Exp $ */
+/* $Id: cliprgn.c,v 1.34 2004/04/25 16:06:20 weiden Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -149,15 +149,6 @@
   return retval;
 }
 
-int STDCALL NtGdiExcludeClipRect(HDC  hDC,
-                         int  LeftRect,
-                         int  TopRect,
-                         int  RightRect,
-                         int  BottomRect)
-{
-  UNIMPLEMENTED;
-}
-
 int STDCALL NtGdiExtSelectClipRgn(HDC  hDC,
                           HRGN  hrgn,
                           int  fnMode)
@@ -217,6 +208,53 @@
   UNIMPLEMENTED;
 }
 
+int STDCALL NtGdiExcludeClipRect(HDC  hDC,
+                         int  LeftRect,
+                         int  TopRect,
+                         int  RightRect,
+                         int  BottomRect)
+{
+   INT Result;
+   RECT Rect;
+   HRGN NewRgn;
+   PDC dc = DC_LockDc(hDC);
+
+   if (!dc)
+   {
+      SetLastWin32Error(ERROR_INVALID_HANDLE);
+      return ERROR;
+   }
+
+   Rect.left = LeftRect;
+   Rect.top = TopRect;
+   Rect.right = RightRect;
+   Rect.bottom = BottomRect;
+
+   IntLPtoDP(dc, (LPPOINT)&Rect, 2);
+
+   NewRgn = UnsafeIntCreateRectRgnIndirect(&Rect);
+   if (!NewRgn)
+   {
+      Result = ERROR;
+   }
+   else if (!dc->w.hClipRgn)
+   {
+      dc->w.hClipRgn = NewRgn;
+      Result = SIMPLEREGION;
+   }
+   else
+   {
+      Result = NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hClipRgn, NewRgn, RGN_DIFF);
+      NtGdiDeleteObject(NewRgn);
+   }
+   if (Result != ERROR)
+      CLIPPING_UpdateGCRegion(dc);
+
+   DC_UnlockDc(hDC);
+
+   return Result;
+}
+
 int STDCALL NtGdiIntersectClipRect(HDC  hDC,
                            int  LeftRect,
                            int  TopRect,
CVSspam 0.2.8