public void DrawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) { if (pen == null) throw new ArgumentNullException ("pen"); DrawEllipticalArc(x,y,width,height, startAngle, sweepAngle, true); StrokePen(pen); }
private void buttonPie_Click(object sender, System.EventArgs e) { ReloadImage(); System.Drawing.Graphics g = imageXView1.Image.GetGraphics(); g.DrawPie(System.Drawing.Pens.Honeydew, 0, 0, 50, 50, 50, 270); imageXView1.Image.ReleaseGraphics(true); }