C# 在指定的画布上画出指定大小的八卦图
public static void DrawBaGua(Graphics g,int width)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
g.FillPie(Brushes.White, 0, 0, width, width, 90, 180);
g.FillPie(Brushes.Black, 0, 0, width, width, 90, -180);
g.FillEllipse(Brushes.White, width / 4, 0, width /2 , width / 2);
g.FillEllipse(Brushes.Black, width / 4, width / 2, width / 2, width / 2);
int r = (int)(width / 13.3333);
g.FillEllipse(Brushes.Black, width / 2 - r, width / 4 - r, 2 * r, 2 * r);
g.FillEllipse(Brushes.White, width / 2 - r, width / 4 * 3 - r, 2 * r, 2 * r);
}