Ellipse function

The Ellipse function draws an ellipse. The center of the ellipse is the center of the specified bounding rectangle. The ellipse is outlined by using the current pen and is filled by using the current brush.

Syntax

BOOL Ellipse(
  HDC hdc,
  int left,
  int top,
  int right,
  int bottom
);

Parameters

hdc

A handle to the device context.

left

The x-coordinate, in logical coordinates, of the upper-left corner of the bounding rectangle.

top

The y-coordinate, in logical coordinates, of the upper-left corner of the bounding rectangle.

right

The x-coordinate, in logical coordinates, of the lower-right corner of the bounding rectangle.

bottom

The y-coordinate, in logical coordinates, of the lower-right corner of the bounding rectangle.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The current position is neither used nor updated by Ellipse.

Examples

For an example, see Using Filled Shapes.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See Also

Arc

ArcTo

Filled Shape Functions

Filled Shapes Overview