示例#1
0
 internal Path(IntPtr handle)
 {
     this.handle = handle;
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#2
0
 internal FontOptions(IntPtr handle)
 {
     this.handle = handle;
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#3
0
 public FontFace(IntPtr handle, bool owned)
 {
     this.handle = handle;
     if (!owned)
     {
         NativeMethods.cairo_font_face_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#4
0
文件: Surface.cs 项目: guytp/ztk
 protected Surface(IntPtr handle, bool owner)
 {
     this.handle = handle;
     if (!owner)
     {
         NativeMethods.cairo_surface_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#5
0
 internal Pattern(IntPtr handle, bool owned)
 {
     Handle = handle;
     if (!owned)
     {
         NativeMethods.cairo_pattern_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#6
0
文件: Context.cs 项目: guytp/ztk
 public GraphicsContext(IntPtr handle, bool owner)
 {
     this.handle = handle;
     if (!owner)
     {
         NativeMethods.cairo_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#7
0
 public Region(IntPtr handle, bool owned)
 {
     this.handle = handle;
     if (!owned)
     {
         NativeMethods.cairo_region_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#8
0
 internal ScaledFont(IntPtr handle, bool owner)
 {
     this.handle = handle;
     if (!owner)
     {
         NativeMethods.cairo_scaled_font_reference(handle);
     }
     if (CairoDebug.Enabled)
     {
         CairoDebug.OnAllocated(handle);
     }
 }
示例#9
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing || CairoDebug.Enabled)
            {
                CairoDebug.OnDisposed <FontFace> (handle, disposing);
            }

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

            NativeMethods.cairo_font_face_destroy(handle);
            handle = IntPtr.Zero;
        }
示例#10
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing || CairoDebug.Enabled)
            {
                CairoDebug.OnDisposed <Pattern> (Handle, disposing);
            }

            if (!disposing || Handle == IntPtr.Zero)
            {
                return;
            }

            NativeMethods.cairo_pattern_destroy(Handle);
            Handle = IntPtr.Zero;
        }