添加项目文件。
This commit is contained in:
47
HYJigPro/XLine2D.cs
Normal file
47
HYJigPro/XLine2D.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user