update for HEAD-2003091401
[reactos.git] / lib / gdi32 / objects / region.c
index 49c5143..1457c98 100644 (file)
@@ -8,34 +8,75 @@
 #include <win32k/kapi.h>
 
 
+/*
+ * @implemented
+ */
+int
+STDCALL
+OffsetClipRgn(
+        HDC     a0,
+        int     a1,
+        int     a2
+        )
+{
+        return NtGdiOffsetClipRgn(a0, a1, a2);
+}
 
+
+/*
+ * @implemented
+ */
+int
+STDCALL
+GetClipRgn(
+        HDC     a0,
+        HRGN    a1
+        )
+{
+       HRGN rgn = NtGdiGetClipRgn(a0);
+       if(rgn)
+       {
+               if(NtGdiCombineRgn(a1, rgn, 0, RGN_COPY) != ERROR) return 1;
+               else
+                       return -1;
+       }
+       else    return 0;
+}
+
+
+/*
+ * @implemented
+ */
 HRGN
 STDCALL
 CreatePolyPolygonRgn(
-       CONST POINT     *a0,
-       CONST INT       *a1,
-       int             a2,
-       int             a3
+       CONST POINT     *lppt,
+       CONST INT       *lpPolyCounts,
+       int             nCount,
+       int             fnPolyFillMode
        )
 {
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+  return NtGdiCreatePolyPolygonRgn ( (CONST PPOINT)lppt,
+    (CONST PINT)lpPolyCounts, nCount, fnPolyFillMode );
 }
 
 
-
+/*
+ * @implemented
+ */
 HBRUSH
 STDCALL
 CreatePatternBrush(
-       HBITMAP         a0
+       HBITMAP         hbmp
        )
 {
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+  return NtGdiCreatePatternBrush ( hbmp );
 }
 
 
-
+/*
+ * @implemented
+ */
 HRGN
 STDCALL
 CreateRectRgn(
@@ -45,37 +86,45 @@ CreateRectRgn(
        int             a3
        )
 {
-       return W32kCreateRectRgn(a0,a1,a2,a3);
+       return NtGdiCreateRectRgn(a0,a1,a2,a3);
 }
 
 
-
+/*
+ * @implemented
+ */
 HRGN
 STDCALL
 CreateRectRgnIndirect(
        CONST RECT      *a0
        )
 {
-       return W32kCreateRectRgnIndirect((RECT *)a0);
+       return NtGdiCreateRectRgnIndirect((RECT *)a0);
 }
 
 
-
+/*
+ * @implemented
+ */
 HRGN
 STDCALL
 CreateRoundRectRgn(
-       int             a0,
-       int             a1,
-       int             a2,
-       int             a3,
-       int             a4,
-       int             a5
+       int     nLeftRect,
+       int     nTopRect,
+       int     nRightRect,
+       int     nBottomRect,
+       int     nWidthEllipse,
+       int     nHeightEllipse
        )
 {
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+  return NtGdiCreateRoundRectRgn (
+    nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse );
 }
 
+
+/*
+ * @implemented
+ */
 BOOL
 STDCALL
 EqualRgn(
@@ -83,9 +132,13 @@ EqualRgn(
        HRGN            a1
        )
 {
-       return W32kEqualRgn(a0,a1);
+       return NtGdiEqualRgn(a0,a1);
 }
 
+
+/*
+ * @implemented
+ */
 int
 STDCALL
 OffsetRgn(
@@ -94,9 +147,13 @@ OffsetRgn(
        int     a2
        )
 {
-       return W32kOffsetRgn(a0,a1,a2);
+       return NtGdiOffsetRgn(a0,a1,a2);
 }
 
+
+/*
+ * @implemented
+ */
 int
 STDCALL
 GetRgnBox(
@@ -104,9 +161,13 @@ GetRgnBox(
        LPRECT  a1
        )
 {
-       return W32kGetRgnBox(a0,a1);
+       return NtGdiGetRgnBox(a0,a1);
 }
 
+
+/*
+ * @implemented
+ */
 BOOL
 STDCALL
 SetRectRgn(
@@ -117,9 +178,13 @@ SetRectRgn(
        int     a4
        )
 {
-       return W32kSetRectRgn(a0,a1,a2,a3,a4);
+       return NtGdiSetRectRgn(a0,a1,a2,a3,a4);
 }
 
+
+/*
+ * @implemented
+ */
 int
 STDCALL
 CombineRgn(
@@ -129,9 +194,13 @@ CombineRgn(
        int     a3
        )
 {
-       return W32kCombineRgn(a0,a1,a2,a3);
+       return NtGdiCombineRgn(a0,a1,a2,a3);
 }
 
+
+/*
+ * @implemented
+ */
 DWORD
 STDCALL
 GetRegionData(
@@ -140,9 +209,13 @@ GetRegionData(
        LPRGNDATA       a2
        )
 {
-       return W32kGetRegionData(a0,a1,a2);
+       return NtGdiGetRegionData(a0,a1,a2);
 }
 
+
+/*
+ * @implemented
+ */
 BOOL
 STDCALL
 PaintRgn(
@@ -150,7 +223,47 @@ PaintRgn(
        HRGN    a1
        )
 {
-       return W32kPaintRgn( a0, a1 );
+       return NtGdiPaintRgn( a0, a1 );
 }
 
 
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+FillRgn(
+       HDC     a0,
+       HRGN    a1,
+       HBRUSH  a2
+       )
+{
+       return NtGdiFillRgn(a0, a1, a2);
+}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+PtInRegion(
+       HRGN    a0,
+       int     a1,
+       int     a2
+       )
+{
+       return NtGdiPtInRegion(a0,a1,a2);
+}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+RectInRegion(
+       HRGN            a0,
+       CONST RECT      *a1
+       )
+{
+       return NtGdiRectInRegion(a0,(CONST PRECT)a1);
+}