public IVisio.Shape DrawNURBS(IList <Point> controlpoints, IList <double> knots, IList <double> weights, int degree) { // flags: // None = 0, // IVisio.VisDrawSplineFlags.visSpline1D var flags = 0; double[] pts_dbl_a = Point.ToDoubles(controlpoints).ToArray(); double[] kts_dbl_a = knots.ToArray(); double[] weights_dbl_a = weights.ToArray(); if (this.Target.Master != null) { var shape = this.Target.Master.DrawNURBS((short)degree, (short)flags, pts_dbl_a, kts_dbl_a, weights_dbl_a); return(shape); } else if (this.Target.Page != null) { var shape = this.Target.Page.DrawNURBS((short)degree, (short)flags, pts_dbl_a, kts_dbl_a, weights_dbl_a); return(shape); } else if (this.Target.Shape != null) { var shape = this.Target.Shape.DrawNURBS((short)degree, (short)flags, pts_dbl_a, kts_dbl_a, weights_dbl_a); return(shape); } throw new System.ArgumentException("Unhandled Drawing Surface"); }
public short[] DropManyU( IList <IVisio.Master> masters, IEnumerable <Point> points) { if (masters == null) { throw new System.ArgumentNullException(nameof(masters)); } if (masters.Count < 1) { return(new short[0]); } if (points == null) { throw new System.ArgumentNullException(nameof(points)); } // NOTE: DropMany will fail if you pass in zero items to drop var masters_obj_array = masters.Cast <object>().ToArray(); var xy_array = Point.ToDoubles(points).ToArray(); System.Array outids_sa; if (this.Target.Master != null) { this.Target.Master.DropManyU(masters_obj_array, xy_array, out outids_sa); } else if (this.Target.Page != null) { this.Target.Page.DropManyU(masters_obj_array, xy_array, out outids_sa); } else if (this.Target.Shape != null) { this.Target.Shape.DropManyU(masters_obj_array, xy_array, out outids_sa); } else { throw new System.ArgumentException("Unhandled Drawing Surface"); } short[] outids = (short[])outids_sa; return(outids); }
public IVisio.Shape DrawBezier(IList <Point> points, short degree, short flags) { var doubles_array = Point.ToDoubles(points).ToArray(); if (this.Target.Master != null) { var shape = this.Target.Master.DrawBezier(doubles_array, degree, flags); return(shape); } else if (this.Target.Page != null) { var shape = this.Target.Page.DrawBezier(doubles_array, degree, flags); return(shape); } else if (this.Target.Shape != null) { var shape = this.Target.Shape.DrawBezier(doubles_array, degree, flags); return(shape); } throw new System.ArgumentException("Unhandled Drawing Surface"); }
public IVisio.Shape DrawPolyLine(IList <Point> points) { var doubles_array = Point.ToDoubles(points).ToArray(); if (this.Target.Master != null) { var shape = this.Target.Master.DrawPolyline(doubles_array, 0); return(shape); } else if (this.Target.Page != null) { var shape = this.Target.Page.DrawPolyline(doubles_array, 0); return(shape); } else if (this.Target.Shape != null) { var shape = this.Target.Shape.DrawPolyline(doubles_array, 0); return(shape); } throw new System.ArgumentException("Unhandled Drawing Surface"); }