GraphicsPath.AddArc
画图函数说明:
public void AddArc(Rectangle rect, float startAngle, float sweepAngle);
- rect:外接矩形大小
- startAngle:起始角度
- sweepAngle:跨越角度
代码块
代码块语法遵循标准markdown代码,例如:
private void Form2_Paint(object sender, PaintEventArgs e)
{
Rectangle bounds = new Rectangle(93, 26, 100, 100);
GraphicsPath pathBounds = new GraphicsPath();
pathBounds.AddArc(bounds, 0, 45);
e.Graphics.DrawPath(new Pen(Color.Black, 1), pathBounds);
pathBounds = new GraphicsPath();
pathBounds.AddArc(bounds, 90, 135);
e.Graphics.DrawPath(new Pen(Color.Red, 1), pathBounds);
}