public void Currentpoint(Art.Point p) { IntPtr native_p = GLib.Marshaller.StructureToPtrAlloc(p); gnome_canvas_path_def_currentpoint(Handle, native_p); p = Art.Point.New(native_p); Marshal.FreeHGlobal(native_p); }
public static Art.Point BezierToVec(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, Art.Point p, int level) { IntPtr native_p = GLib.Marshaller.StructureToPtrAlloc(p); IntPtr raw_ret = art_bezier_to_vec(x0, y0, x1, y1, x2, y2, x3, y3, native_p, level); Art.Point ret = Art.Point.New(raw_ret); p = Art.Point.New(native_p); Marshal.FreeHGlobal(native_p); return(ret); }
public static void Point(Art.Point dst, Art.Point src, double[] affine) { IntPtr native_dst = GLib.Marshaller.StructureToPtrAlloc(dst); IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc(src); art_affine_point(native_dst, native_src, affine); dst = Art.Point.New(native_dst); Marshal.FreeHGlobal(native_dst); src = Art.Point.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); }