cline.cs
来自「苏金明编写的《用VB.NET和VC#.NET开发交互式CAD系统》一书的源代码」· CS 代码 · 共 65 行
CS
65 行
using System;
using System.Drawing;
namespace foreach2
{
/// <summary>
/// CLine 的摘要说明。
/// </summary>
public class CLine
{
private int m_ID,m_Width;
private Color m_Color;
private PointF m_Begin,m_End;
public int ID
{
get{return m_ID;}
set{m_ID=value;}
}
public Color Color
{
get{return m_Color;}
set{m_Color=value;}
}
public int Width
{
get{return m_Width;}
set{m_Width=value;}
}
public PointF LBegin
{
get{return m_Begin;}
set{m_Begin=value;}
}
public PointF LEnd
{
get{return m_End;}
set{m_End=value;}
}
public CLine()
{
}
public CLine(int aID,Color aColor,int aWidth,PointF p1,PointF p2)
{
m_ID = aID;
m_Color = aColor;
m_Width = aWidth;
m_Begin = p1;
m_End = p2;
}
public void Draw(Graphics g)
{
g.DrawLine(new Pen(m_Color, m_Width), m_Begin, m_End);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?