コード例 #1
0
ファイル: FontOptions.cs プロジェクト: pmq20/mono_forked
 internal FontOptions(IntPtr handle)
 {
     this.handle = handle;
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #2
0
 internal Path(IntPtr handle)
 {
     this.handle = handle;
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #3
0
ファイル: Surface.cs プロジェクト: fengweijp/CairoSharp
		protected virtual void Dispose (bool disposing)
		{
			if (!disposing || CairoDebug.Enabled)
				CairoDebug.OnDisposed<Surface> (handle, disposing);

			if (handle == IntPtr.Zero)
				return;

			NativeMethods.cairo_surface_destroy (handle);
			handle = IntPtr.Zero;
		}
コード例 #4
0
ファイル: Surface.cs プロジェクト: fengweijp/CairoSharp
		protected Surface (IntPtr handle, bool owner)
		{
			if (handle == IntPtr.Zero)
				throw new ArgumentException ("handle should not be NULL", "handle");

			this.handle = handle;
			if (!owner)
				NativeMethods.cairo_surface_reference (handle);
			if (CairoDebug.Enabled)
				CairoDebug.OnAllocated (handle);
		}
コード例 #5
0
 protected Surface(IntPtr handle, bool owner)
 {
     this.handle = handle;
     if (!owner)
     {
         NativeMethods.cairo_surface_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #6
0
ファイル: Context.cs プロジェクト: masums/Crow
 public Context(IntPtr handle, bool owner)
 {
     this.handle = handle;
     if (!owner)
     {
         NativeMethods.cairo_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #7
0
 internal Pattern(IntPtr handle, bool owned)
 {
     Handle = handle;
     if (!owned)
     {
         NativeMethods.cairo_pattern_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #8
0
ファイル: FontFace.cs プロジェクト: pmq20/mono_forked
 public FontFace(IntPtr handle, bool owned)
 {
     this.handle = handle;
     if (!owned)
     {
         NativeMethods.cairo_font_face_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #9
0
ファイル: ScaledFont.cs プロジェクト: pmq20/mono_forked
 internal ScaledFont(IntPtr handle, bool owner)
 {
     this.handle = handle;
     if (!owner)
     {
         NativeMethods.cairo_scaled_font_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
コード例 #10
0
        internal FontOptions(IntPtr handle)
        {
            if (handle == IntPtr.Zero)
            {
                throw new ArgumentException("handle should not be NULL", "handle");
            }

            this.handle = handle;
            if (CairoDebug.Enabled)
            {
                CairoDebug.OnAllocated(handle);
            }
        }
コード例 #11
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing || CairoDebug.Enabled)
            {
                CairoDebug.OnDisposed <FontOptions> (handle, disposing);
            }

            if (handle == IntPtr.Zero)
            {
                return;
            }

            NativeMethods.cairo_font_options_destroy(handle);
            handle = IntPtr.Zero;
        }
コード例 #12
0
ファイル: Region.cs プロジェクト: fengweijp/CairoSharp
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing || CairoDebug.Enabled)
            {
                CairoDebug.OnDisposed <Region> (handle, disposing);
            }

            if (handle == IntPtr.Zero)
            {
                return;
            }

            NativeMethods.cairo_region_destroy(Handle);
            handle = IntPtr.Zero;
        }
コード例 #13
0
ファイル: FontFace.cs プロジェクト: fengweijp/CairoSharp
        public FontFace(IntPtr handle, bool owned)
        {
            if (handle == IntPtr.Zero)
            {
                throw new ArgumentException("handle should not be NULL", "handle");
            }

            this.handle = handle;
            if (!owned)
            {
                NativeMethods.cairo_font_face_reference(handle);
            }
            if (CairoDebug.Enabled)
            {
                CairoDebug.OnAllocated(handle);
            }
        }
コード例 #14
0
        internal Pattern(IntPtr handle, bool owned)
        {
            if (handle == IntPtr.Zero)
            {
                throw new ArgumentException("handle should not be NULL", "handle");
            }

            Handle = handle;
            if (!owned)
            {
                NativeMethods.cairo_pattern_reference(handle);
            }
            if (CairoDebug.Enabled)
            {
                CairoDebug.OnAllocated(handle);
            }
        }