Update SetMetaRgn, UpdateColors, ResizePalette and add support for windows client...
[reactos.git] / reactos / dll / win32 / gdi32 / objects / region.c
index 6c6f470..e32abac 100644 (file)
@@ -240,6 +240,17 @@ GetClipRgn(
   return Ret;
 }
 
+/*
+ * @implemented
+ */
+int
+STDCALL
+GetMetaRgn(HDC hdc,
+           HRGN hrgn)
+{
+    return NtGdiGetRandomRgn(hdc,hrgn,2);
+}
+
 /*
  * @implemented
  */
@@ -313,3 +324,28 @@ SetRectRgn(HRGN hrgn,
 #endif
 }
 
+/*
+ * @implemented
+ */
+int
+STDCALL
+SetMetaRgn( HDC hDC )
+{
+ if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)
+    return NtGdiSetMetaRgn(hDC);
+#if 0
+ PLDC pLDC = GdiGetLDC(hDC);
+ if ( pLDC && GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC )
+ {
+    if (pLDC->iType == LDC_EMFLDC || EMFDRV_SetMetaRgn(hDC))
+    {
+       return NtGdiSetMetaRgn(hDC);
+    }
+    else
+       SetLastError(ERROR_INVALID_HANDLE);
+ }
+#endif
+ return 0;
+}
+
+