如何在C#中画半圆?

use*_*206 -1 c#

我找到了这段代码,但我不知道如何在 WinForms 中使用它?我的问题是我需要如何逐步使用此代码来在表单中绘制半圆。

        private void DrawEllipseRectangle(PaintEventArgs e)
    {
        // Create pen.
        Pen blackPen = new Pen(Color.Black, 3);

        // Create rectangle for ellipse.
        Rectangle rect = new Rectangle(0, 0, 200, 100);

        // Draw ellipse to screen.
        e.Graphics.DrawEllipse(blackPen, rect);
    }
Run Code Online (Sandbox Code Playgroud)

Dai*_*Dai 5

用于Graphics.DrawPie绘制圆形的饼图切片。半圆是 180 度扫描的饼图。