/// <summary> /// Add new segment /// </summary> /// <param name="lType">Line type</param> /// <param name="grp">Group</param> /// <param name="layer">Layer</param> /// <param name="x0">First extremity abscissa</param> /// <param name="y0">First extremity ordinate</param> /// <param name="x1">Second extremity abscissa</param> /// <param name="y1">Second extremity ordinate</param> /// <returns>Segment entity</returns> public PicSegment AddSegment( PicGraphics.LT lType, short grp, short layer , double x0, double y0, double x1, double y1) { PicSegment seg = PicSegment.CreateNewSegment(GetNewEntityId(), lType, new Vector2D(x0, y0), new Vector2D(x1, y1)); seg.Group = grp; seg.Layer = layer; AddEntity(seg); return(seg); }
/// <summary> /// Add new segment /// </summary> /// <param name="lType">Line type</param> /// <param name="pt0">First extremity of segment</param> /// <param name="pt1">Second extremity of segment</param> /// <returns>Segment entity</returns> public PicSegment AddSegment( PicGraphics.LT lType, short grp, short layer , Vector2D pt0, Vector2D pt1) { PicSegment seg = PicSegment.CreateNewSegment(GetNewEntityId(), lType, pt0, pt1); seg.Group = grp; seg.Layer = layer; AddEntity(seg); return(seg); }