Drawing circles with System.Drawing

后端 未结 8 1130
醉酒成梦
醉酒成梦 2021-01-03 22:56

I have this code that draws a Rectangle ( Im trying to remake the MS Paint )

 case \"Rectangle\":
               if (tempDraw != null)
                {
             


        
8条回答
  •  甜味超标
    2021-01-03 23:24

         private void DrawEllipseRectangle(PaintEventArgs e)
            {
                Pen p = new Pen(Color.Black, 3);
                Rectangle r = new Rectangle(100, 100, 100, 100);
                e.Graphics.DrawEllipse(p, r);
            }
         private void Form1_Paint(object sender, PaintEventArgs e)
            {
                DrawEllipseRectangle(e);
            }
    

提交回复
热议问题