Graphics.DrawEllipse

DrawEllipse(Pen, RectangleF)

Draws an ellipse defined by a bounding RectangleF.

public void DrawEllipse(Pen pen, RectangleF rect)
ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.

Exceptions

exceptioncondition
ArgumentNullExceptionpen is null.

See Also


DrawEllipse(Pen, float, float, float, float)

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

public void DrawEllipse(Pen pen, float x, float y, float width, float height)
ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xSingleThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
ySingleThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthSingleWidth of the bounding rectangle that defines the ellipse.
heightSingleHeight of the bounding rectangle that defines the ellipse.

Exceptions

exceptioncondition
ArgumentNullExceptionpen is null.

See Also


DrawEllipse(Pen, Rectangle)

Draws an ellipse specified by a bounding Rectangle structure.

public void DrawEllipse(Pen pen, Rectangle rect)
ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleRectangle structure that defines the boundaries of the ellipse.

Exceptions

exceptioncondition
ArgumentNullExceptionpen is null.

See Also


DrawEllipse(Pen, int, int, int, int)

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

public void DrawEllipse(Pen pen, int x, int y, int width, int height)
ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xInt32The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yInt32The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthInt32Width of the bounding rectangle that defines the ellipse.
heightInt32Height of the bounding rectangle that defines the ellipse.

Exceptions

exceptioncondition
ArgumentNullExceptionpen is null.

See Also