enter image description here BitmapImage = new Bitmap(width,height);
Graphics graphics = Graphics.FromImage(BitmapImage);
SolidBrush solidBrush = new SolidBrush(Color.Purple);
GraphicsPath myGraphicsPath = new GraphicsPath();
myGraphicsPath.AddArc(100,50,50,50,0,-180);
myGraphicsPath.AddLine(new Point(100, 100), new Point(100, 200));
enter image description here
myGraphicsPath.AddLine(new Point(150, 200), new Point(150, 75));
myGraphicsPath.AddArc(100, 300, 50, 50, 0, 180);
graphics.FillPath(solidBrush, myGraphicsPath);
graphics.DrawPath(pen1, myGraphicsPath);
Hello. I wanted to draw a curved closed figure in winforms C#, but it didn’t work
New contributor