using System; using System.Runtime.CompilerServices; namespace HYJig { public class XLine2D : XDrawable2D, ICloneable { public XLine2D() { this.PointStart = Point.Empty; this.PointEnd = Point.Empty; } public XLine2D(Point ptStart, Point ptEnd) { this.PointStart = ptStart; this.PointEnd = ptEnd; } public override void Draw(XGraphics g) { try { g.m_graphics.DrawLine(g.m_pen, this.PointStart, this.PointEnd); } catch { } } public object Clone() { try { return new XLine2D(this.PointStart, this.PointEnd); } catch { } return null; } public Point PointStart { get; set; } public Point PointEnd { get; set; } } }