GraphicsPath.AddEllipse(const RectF) method
Applies to: desktop apps only
The GraphicsPath::AddEllipse method adds an ellipse to this path.
Syntax
Status AddEllipse(
[in, ref] const RectF &rect
);
Parameters
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.
Remarks
A GraphicsPath object stores an ellipse as a sequence of four connected Bézier splines. The GraphicsPath object does not store the upper-left corner, width, and height of the ellipse's bounding rectangle.
Examples
The following example creates a GraphicsPath object path, adds an ellipse to path, and then draws path.
VOID Example_AddEllipse(HDC hdc)
{
Graphics graphics(hdc);
RectF rect(20.0f, 20.0f, 200.0f, 100.0f);
GraphicsPath path;
path.AddEllipse(rect);
// Draw the path.
Pen pen(Color(255, 255, 0, 0));
graphics.DrawPath(&pen, &path);
}
Requirements
Minimum supported client |
Windows XP, Windows 2000 Professional |
Minimum supported server |
Windows 2000 Server |
Product |
GDI+ 1.0 |
Header |
Gdipluspath.h (include Gdiplus.h) |
Library |
Gdiplus.lib |
DLL |
Gdiplus.dll |
See also
Constructing and Drawing Paths
Send comments about this topic to Microsoft
Build date: 3/6/2012