[gdi32]
authorJames Tabor <james.tabor@reactos.org>
Wed, 23 Dec 2009 23:30:26 +0000 (23:30 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 23 Dec 2009 23:30:26 +0000 (23:30 +0000)
- Move more region code from stubs into the appropriate file.
- Enable and fix more user code.

svn path=/trunk/; revision=44747

reactos/dll/win32/gdi32/misc/stubs.c
reactos/dll/win32/gdi32/objects/region.c

index 529414a..24c141e 100644 (file)
@@ -1704,25 +1704,6 @@ GetFontData(HDC hdc,
     return NtGdiGetFontData(hdc, dwTable, dwOffset, lpvBuffer, cbData);
 }
 
-
-/*
- * @implemented
- *
- */
-DWORD
-WINAPI
-GetRegionData(HRGN hrgn,
-              DWORD nCount,
-              LPRGNDATA lpRgnData)
-{
-    if (!lpRgnData)
-    {
-        nCount = 0;
-    }
-
-    return NtGdiGetRegionData(hrgn,nCount,lpRgnData);
-}
-
 INT
 WINAPI
 NamedEscape(HDC hdc,
index 4d33d57..c3538c5 100644 (file)
@@ -190,7 +190,7 @@ CreateEllipticRgnIndirect(
  */
 HRGN
 WINAPI
-CreateRectRgn(int x1, int y1, int x2,int y2)
+CreateRectRgn(int x1, int y1, int x2, int y2)
 {
     /* FIXME Some part need be done in user mode */
     return NtGdiCreateRectRgn(x1,y1,x2,y2);
@@ -285,6 +285,24 @@ GetMetaRgn(HDC hdc,
     return NtGdiGetRandomRgn(hdc, hrgn, METARGN);
 }
 
+/*
+ * @implemented
+ *
+ */
+DWORD
+WINAPI
+GetRegionData(HRGN hrgn,
+              DWORD nCount,
+              LPRGNDATA lpRgnData)
+{
+    if (!lpRgnData)
+    {
+        nCount = 0;
+    }
+
+    return NtGdiGetRegionData(hrgn,nCount,lpRgnData);
+}
+
 /*
  * @implemented
  *
@@ -294,10 +312,11 @@ WINAPI
 GetRgnBox(HRGN hrgn,
           LPRECT prcOut)
 {
-#if 0
   PRGN_ATTR Rgn_Attr;
-  if (!GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
+
+  if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
      return NtGdiGetRgnBox(hrgn, prcOut);
+
   if (Rgn_Attr->Flags == NULLREGION)
   {
      prcOut->left   = 0;
@@ -307,12 +326,12 @@ GetRgnBox(HRGN hrgn,
   }
   else
   {
-     if (Rgn_Attr->Flags != SIMPLEREGION) return NtGdiGetRgnBox(hrgn, prcOut);
-     *prcOut = Rgn_Attr->Rect;
+     if (Rgn_Attr->Flags != SIMPLEREGION)
+        return NtGdiGetRgnBox(hrgn, prcOut);
+     /* WARNING! prcOut is never checked newbies! */
+     RtlCopyMemory( prcOut, &Rgn_Attr->Rect, sizeof(RECT));
   }
   return Rgn_Attr->Flags;
-#endif
-  return NtGdiGetRgnBox(hrgn, prcOut);
 }
 
 /*