Files

48 lines
979 B
C#
Raw Permalink Normal View History

2026-02-23 14:58:05 +08:00
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; }
}
}