大家好,我有这个代码来创建一个简单的圆圈
private void panel1_Paint(object sender, PaintEventArgs e)
{
Graphics g;
Pen myPen = new Pen(Color.Black, 1);
Point sp = new Point(5, 5);//starting point sp
Point ep = new Point(100, 100);//ending point ep
g = this.CreateGraphics();//tells compiler that we are going to draw on this very form
g.DrawLine(myPen, sp, ep);
g = this.CreateGraphics();
g.DrawEllipse(myPen, 0, 0, 90, 90);
}
问题是当我运行它时,我会呈现这种不完整的输出
你能告诉我为什么会这样吗?谢谢你