Graphics.FillEllipse(const Brush*, REAL, REAL, REAL, REAL) method

Applies to: desktop apps only

The Graphics::FillEllipse method uses a brush to fill the interior of an ellipse that is specified by coordinates and dimensions.

Syntax

Status FillEllipse(
  [in]  const Brush *brush,
  [in]  REAL x,
  [in]  REAL y,
  [in]  REAL width,
  [in]  REAL height
);

Parameters

  • brush [in]
    Type: const Brush*

    Pointer to a brush that is used to paint the interior of the ellipse.

  • x [in]
    Type: REAL

    Real number that specifies the x-coordinate of the upper-left corner of the rectangle that specifies the boundaries of the ellipse.

  • y [in]
    Type: REAL

    Real number that specifies the y-coordinate of the upper-left corner of the rectangle that specifies the boundaries of the ellipse.

  • width [in]
    Type: REAL

    Real number that specifies the width of the rectangle that specifies the boundaries of the ellipse.

  • height [in]
    Type: REAL

    Real number that specifies the height of the 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 coordinates and dimensions.

VOID Example_FillEllipse4(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a SolidBrush object.
   SolidBrush blackBrush(Color(255, 0, 0, 0));

   // Initialize the variables that define the ellipse.
   REAL x = 0.0f;
   REAL y = 0.0f;
   REAL width = 200.1f;
   REAL height = 100.4f;

   // Fill the ellipse.
   graphics.FillEllipse(&blackBrush, x, y, width, height);
}

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

Graphics

SolidBrush

Using a Brush to Fill Shapes

Brushes and Filled Shapes

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012