Exemplo n.º 1
0
		private void DisposeHandle ()
		{
			if (nativeRegion != IntPtr.Zero) {
				GDIPlus.GdipDeleteRegion (nativeRegion);
				nativeRegion = IntPtr.Zero;
			}
		}
Exemplo n.º 2
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);
		}