Graphics.DrawEllipse(const Pen*, const RectF) method
Applies to: desktop apps only
The Graphics::DrawEllipse method draws an ellipse.
Syntax
Status DrawEllipse(
[in] const Pen *pen,
[in, ref] const RectF &rect
);
Parameters
pen [in]
Type: const Pen*Pointer to a pen that is used to draw the ellipse.
rect [in, ref]
Type: const RectFReference to a rectangle that bounds the ellipse.
Return value
Type:
Type: Status****
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Examples
The following example draws an ellipse.
VOID Example_DrawEllipse2(HDC hdc)
{
Graphics graphics(hdc);
// Create a Pen object.
Pen bluePen(Color(255, 0, 0, 255));
// Create a Rect object that bounds the ellipse.
RectF ellipseRect(0.0f, 0.0f, 200.0f, 100.0f);
// Draw the ellipse.
graphics.DrawEllipse(&bluePen, ellipseRect);
}
Requirements
Minimum supported client |
Windows XP, Windows 2000 Professional |
Minimum supported server |
Windows 2000 Server |
Product |
GDI+ 1.0 |
Header |
Gdiplusgraphics.h (include Gdiplus.h) |
Library |
Gdiplus.lib |
DLL |
Gdiplus.dll |
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012