c# windows 形式的绘图点
drawing point in c# windows form
Visual studio 表示存在未处理的 OverflowException
//draws the point.
public void Draw(Graphics g)
{
float radius = 3; //radius of the circle which describes the point.
// draws the circle of the point, with parameters of the square which bounds the circle.
g.DrawEllipse(new Pen(Color.Black, 6F), float.Parse((this.X - radius).ToString()), float.Parse((this.Y - radius).ToString()), 2 * radius, 2 * radius);
}
您最终得到的点值超出了图形边界。检查您的 this.X 和 this.Y 值。见 What are the hard bounds for drawing coordinates in GDI+?
Visual studio 表示存在未处理的 OverflowException
//draws the point.
public void Draw(Graphics g)
{
float radius = 3; //radius of the circle which describes the point.
// draws the circle of the point, with parameters of the square which bounds the circle.
g.DrawEllipse(new Pen(Color.Black, 6F), float.Parse((this.X - radius).ToString()), float.Parse((this.Y - radius).ToString()), 2 * radius, 2 * radius);
}
您最终得到的点值超出了图形边界。检查您的 this.X 和 this.Y 值。见 What are the hard bounds for drawing coordinates in GDI+?