Easy Way to Learn ASP.NET

GDI+ Tutorial

GDI+ Introduction
GDI+ Lines
GDI+ Rectangles
GDI+ Ellipses
GDI+ Arcs
GDI+ Polygons
GDI+ Cardinal Splines
GDI+ Bezier Splines
GDI+ Graphics Paths
GDI+ Brushes
GDI+ Regions
GDI+ Antialiasing
GDI+ Bitmaps
GDI+ Metafiles
GDI+ Transformations
GDI+ Text

Drawing Ellipses Using GDI+

You can easily draw ellipses using the DrawEllipse methods of the Graphic class.


Drawing an Ellipse

To draw an ellipse, call the DrawEllipse method of the Graphic object. The Pen object is passed as one of the arguments to the DrawEllipse method.

The following is the syntax of DrawEllipse method:

DrawEllipse(ByVal pen As System.Drawing.Pen, ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single)

The following code example demonstrates how to draw an ellipse: