pictureBox2.CreateGraphics();
            Pen pen = new Pen(Brushes.Red);
            
//初始半径
            float r0 = 10;
            
//圆心
            float x0 = 100;
            
float y0 = 100;

            
//圆的宽度和高度
            float width = 0;
            
float height = 0;

            
float x = 0;
            
float y = 0;
            
//圆半径的递增数量
            float d = 20;

            
for (int i = 0; i < 10; i++)
            {             
                
//计算当前圆的宽度和高度
                width = x0 + r0 + d*i;
                height 
= y0 + r0 + d*i;
                
//计算当前圆的左上角顶点坐标
                x = x0 - width / 2;
                y 
= y0 - height / 2;
                
//画圆
                graphics.DrawEllipse(pen, x, y, width, height);
            }

相关文章:

  • 2021-08-26
  • 2021-07-20
  • 2021-12-28
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-12-01
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案