Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CDC::Ellipse 

Draws an ellipse.


BOOL Ellipse(
   int x1,
   int y1,
   int x2,
   int y2 
);
BOOL Ellipse(
   LPCRECT lpRect 
);

Parameters

x1

Specifies the logical x-coordinate of the upper-left corner of the ellipse's bounding rectangle.

y1

Specifies the logical y-coordinate of the upper-left corner of the ellipse's bounding rectangle.

x2

Specifies the logical x-coordinate of the lower-right corner of the ellipse's bounding rectangle.

y2

Specifies the logical y-coordinate of the lower-right corner of the ellipse's bounding rectangle.

lpRect

Specifies the ellipse's bounding rectangle. You can also pass a CRect object for this parameter.

Nonzero if the function is successful; otherwise 0.

The center of the ellipse is the center of the bounding rectangle specified by x1, y1, x2, and y2, or lpRect. The ellipse is drawn with the current pen, and its interior is filled with the current brush.

The figure drawn by this function extends up to, but does not include, the right and bottom coordinates. This means that the height of the figure is y2y1 and the width of the figure is x2x1.

If either the width or the height of the bounding rectangle is 0, no ellipse is drawn.

Community Additions

ADD
Show:
© 2015 Microsoft