Exemplo n.º 1
0
		public void ReleaseHrgn (IntPtr regionHandle)		
		{
			if (regionHandle == IntPtr.Zero) 
				throw new ArgumentNullException ("regionHandle");

			Status status = Status.Ok;
			if (GDIPlus.RunningOnUnix ()) {
				// for libgdiplus HRGN == GpRegion* 
				status = GDIPlus.GdipDeleteRegion (regionHandle);
			} else {
				// ... but on Windows HRGN are (old) GDI objects
				if (!GDIPlus.DeleteObject (regionHandle))
					status = Status.InvalidParameter;
			}
			GDIPlus.CheckStatus (status);
		}