Graphics.FillEllipse(const Brush*, const Rect) method
Applies to: desktop apps only
The Graphics::FillEllipse method uses a brush to fill the interior of an ellipse that is specified by a rectangle.
Syntax
Status FillEllipse(
[in] const Brush *brush,
[in, ref] const Rect &rect
);
Parameters
brush [in]
Type: const Brush*Pointer to a Brush object that is used to paint the interior of the ellipse.
rect [in, ref]
Type: const RectReference to a rectangle that specifies the boundaries of 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 fills an ellipse that is defined by a bounding rectangle.
VOID Example_FillEllipse(HDC hdc)
{
Graphics graphics(hdc);
// Create a SolidBrush object.
SolidBrush blackBrush(Color(255, 0, 0, 0));
// Create the Rect object that defines the ellipse.
Rect ellipseRect(0, 0, 200, 100);
// Fill the ellipse.
graphics.FillEllipse(&blackBrush, 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