帮忙修改下代码!!!
功能要求 在一个平面画半径连续的圆!即圆心位置不变!!我的代码圆心一直在变,求修改!!!
Pen mypen = new Pen(Color.Red, 2);
Graphics g;
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
timer1.Start();
g = this.pictureBox1.CreateGraphics();
}
}
int x = 0;
private void timer1_Tick(object sender, EventArgs e)
{
g.DrawEllipse(mypen, 100 + x / 2, 100 + x / 2, 2*x, 2*x);
x+=10;
if (x>pictureBox1.Width/4)
timer1.Stop();
}