Author: spouliot
Date: 2006-05-25 14:58:47 -0400 (Thu, 25 May 2006)
New Revision: 61133
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/graphics.c
Log:
2006-05-25 Sebastien Pouliot <[EMAIL PROTECTED]>
* graphics.c: Implemented GdipSetClipHrgn before finding out (at test
time that it's not exposed thru System.Drawing.dll).
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-05-25 18:53:10 UTC (rev 61132)
+++ trunk/libgdiplus/src/ChangeLog 2006-05-25 18:58:47 UTC (rev 61133)
@@ -1,5 +1,7 @@
-2006-05-25 Sebastien Pouliot <[EMAIL PROTECTED]>
+2006-05-25 Sebastien Pouliot <[EMAIL PROTECTED]>
+ * graphics.c: Implemented GdipSetClipHrgn before finding out (at test
+ time that it's not exposed thru System.Drawing.dll).
* region.c: Implement GdipGetRegionHRgn and GdipCreateRegionHrgn. This
fix a possible double dispose in S.D.
Modified: trunk/libgdiplus/src/graphics.c
===================================================================
--- trunk/libgdiplus/src/graphics.c 2006-05-25 18:53:10 UTC (rev 61132)
+++ trunk/libgdiplus/src/graphics.c 2006-05-25 18:58:47 UTC (rev 61133)
@@ -4158,10 +4158,27 @@
return status;
}
+/* Note: not exposed in System.Drawing.dll */
GpStatus
GdipSetClipHrgn (GpGraphics *graphics, void *hRgn, CombineMode combineMode)
{
- return NotImplemented;
+ GpStatus status;
+
+ if (!graphics)
+ return InvalidParameter;
+
+ if (hRgn) {
+ status = GdipSetClipRegion (graphics, (GpRegion*)hRgn,
combineMode);
+ } else {
+ /* hRng == NULL means an infinite region */
+ GpRegion *work;
+ status = GdipCreateRegion (&work);
+ if (status == Ok) {
+ status = GdipSetClipRegion (graphics, work,
combineMode);
+ GdipDeleteRegion (work);
+ }
+ }
+ return status;
}
GpStatus
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches