Graphics.DrawEllipse Method (Pen, Rectangle)
.NET Framework (current version)
Draws an ellipse specified by a bounding Rectangle structure.
System.Drawing (in System.Drawing.dll)
public void DrawEllipse(
This method draws an ellipse that is defined by the bounding rectangle specified by the rect parameter.
The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. The code performs the following actions:
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.
Return to top
Available since 1.1