Author: spouliot
Date: 2006-05-25 12:04:47 -0400 (Thu, 25 May 2006)
New Revision: 61117
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/gdip.h
trunk/libgdiplus/src/region.c
Log:
2006-05-25 Sebastien Pouliot <[EMAIL PROTECTED]>
* region.c: Implement GdipGetRegionHRgn and GdipCreateRegionHrgn. This
fix a possible double dispose in S.D.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-05-25 16:03:26 UTC (rev 61116)
+++ trunk/libgdiplus/src/ChangeLog 2006-05-25 16:04:47 UTC (rev 61117)
@@ -1,3 +1,8 @@
+2006-05-25 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * region.c: Implement GdipGetRegionHRgn and GdipCreateRegionHrgn. This
+ fix a possible double dispose in S.D.
+
2006-05-24 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* image.c:
Modified: trunk/libgdiplus/src/gdip.h
===================================================================
--- trunk/libgdiplus/src/gdip.h 2006-05-25 16:03:26 UTC (rev 61116)
+++ trunk/libgdiplus/src/gdip.h 2006-05-25 16:04:47 UTC (rev 61117)
@@ -107,6 +107,7 @@
typedef gpointer *LPHANDLE;
typedef guint32 SOCKET;
typedef gpointer HMODULE;
+typedef gpointer HRGN;
#define CONST const
#define VOID void
Modified: trunk/libgdiplus/src/region.c
===================================================================
--- trunk/libgdiplus/src/region.c 2006-05-25 16:03:26 UTC (rev 61116)
+++ trunk/libgdiplus/src/region.c 2006-05-25 16:04:47 UTC (rev 61117)
@@ -1648,3 +1648,26 @@
return Ok;
}
+
+GpStatus
+GdipGetRegionHRgn (GpRegion *region, GpGraphics *graphics, HRGN *hRgn)
+{
+ if (!region || !graphics || !hRgn)
+ return InvalidParameter;
+
+ /* infinite region returns NULL */
+ if (gdip_is_InfiniteRegion (region))
+ *hRgn = NULL;
+ else
+ *hRgn = region;
+ return Ok;
+}
+
+GpStatus
+GdipCreateRegionHrgn (HRGN hRgn, GpRegion **region)
+{
+ if (!hRgn || !region)
+ return InvalidParameter;
+
+ return GdipCloneRegion ((GpRegion*) hRgn, region);
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches