public void BboxDrect(Art.DRect drect) { IntPtr native_drect = GLib.Marshaller.StructureToPtrAlloc(drect); art_vpath_bbox_drect(Handle, native_drect); drect = Art.DRect.New(native_drect); Marshal.FreeHGlobal(native_drect); }
public static void ToIrect(Art.IRect dst, Art.DRect src) { IntPtr native_dst = GLib.Marshaller.StructureToPtrAlloc(dst); IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc(src); art_drect_to_irect(native_dst, native_src); dst = Art.IRect.New(native_dst); Marshal.FreeHGlobal(native_dst); src = Art.DRect.New(native_src); Marshal.FreeHGlobal(native_src); }
public void Copy(Art.DRect src) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc(src); art_drect_copy(this_as_native, native_src); ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); src = Art.DRect.New(native_src); Marshal.FreeHGlobal(native_src); }
public void AffineTransform(Art.DRect src, double[] matrix) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc(src); art_drect_affine_transform(this_as_native, native_src, matrix); ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); src = Art.DRect.New(native_src); Marshal.FreeHGlobal(native_src); }
public int AddSegment(out int pn_segs_max, out int pn_points_max, int n_points, int dir, Art.Point points, Art.DRect bbox) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_points = GLib.Marshaller.StructureToPtrAlloc(points); IntPtr native_bbox = GLib.Marshaller.StructureToPtrAlloc(bbox); int raw_ret = art_svp_add_segment(this_as_native, out pn_segs_max, out pn_points_max, n_points, dir, native_points, native_bbox); int ret = raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); points = Art.Point.New(native_points); Marshal.FreeHGlobal(native_points); bbox = Art.DRect.New(native_bbox); Marshal.FreeHGlobal(native_bbox); return(ret); }
static void ReadNative(IntPtr native, ref Art.DRect target) { target = New(native); }