CDC::Ellipse
BOOL Ellipse( int x1, int y1, int x2, int y2 );
BOOL Ellipse( LPCRECT lpRect );
Return Value
Nonzero if the function is successful; otherwise 0.
如果成功,则返回非零值,否则为0。
Parameters
x1
Specifies the logical x-coordinate of the upper-left corner of the ellipse’s bounding rectangle.
指定椭圆外接矩形左上角的X逻辑坐标
y1
Specifies the logical y-coordinate of the upper-left corner of the ellipse’s bounding rectangle.
指定椭圆外接矩形左上角的Y逻辑坐标。
x2
Specifies the logical x-coordinate of the lower-right corner of the ellipse’s bounding rectangle.
指定椭圆外接矩形右下角的X逻辑坐标。
y2
Specifies the logical y-coordinate of the lower-right corner of the ellipse’s bounding rectangle.
指定椭圆外接矩形右下角的Y逻辑坐标。
lpRect
Specifies the ellipse’s bounding rectangle. You can also pass a CRect object for this parameter.
指定椭圆外接矩形时,可以将Crect对象传递给该参数。
Remarks
Draws an ellipse. 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.
绘制椭圆。椭圆与其外接矩形的中心由 x1,y1,x2,y2 或lpRect 指定,椭圆由当前画笔绘制,内部由当前画刷填充。
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 y2 – y1 and the width of the figure is x2 – x1.
该函数绘制的图形可以扩充到但并不包括右边及底部坐标,亦即图形的高度是y2-y1,宽度是x2-x1。
If either the width or the height of the bounding rectangle is 0, no ellipse is drawn.
如果外接椭圆的宽度或高度是0,则不绘制椭圆。