Ellipse

Syntax

BOOL Ellipse(hDC,X1,Y1,X2,Y2)

This function draws an ellipse. The center of the ellipse is the center of the bounding rectangle specified by the X1, Y1, X2, and Y2 parameters. The ellipse border is drawn with the current pen, and the interior is filled with the current brush.

If the bounding rectangle is empty, nothing is drawn.

Parameter Type/Description  

hDC HDC Identifies the device context.  
X1 int Specifies the logical x-coordinate of the upper-left corner of the bounding rectangle.  
Y1 int Specifies the logical y-coordinate of the upper-left corner of the bounding rectangle.  
X2 int Specifies the logical x-coordinate of the lower-right corner of the bounding rectangle.  
Y2 int Specifies the logical y-coordinate of the lower-right corner of the bounding rectangle.  

Return Value

The return value specifies whether the ellipse is drawn. It is nonzero if the ellipse is drawn. Otherwise, it is zero.

Comments

The width of the rectangle, specified by the absolute value of X2 – X1, must not exceed 32,767 units. This limit applies to the height of the rectangle as well.

The current position is neither used nor updated by this function.