绘制椭圆

Ellipse() 函数可以用来绘制椭圆,它的原型为:

BOOL Ellipse、(http://www.amjmh.com/v/)

HDC hdc, //设备环境句柄
int nLeftRect, //左上角x坐标
int nTopRect, //左上角y坐标
int nRightRect, //右下角x坐标
int nBottomRect //右下角y坐标
);
1
2
3
4
5
6
7
注意:当 nRightRect - nLeftRect = nBottomRect - nRightRect 时绘制出的是一个圆。

示例代码:

case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
Ellipse(hdc, 20, 20, 180,90);
EndPaint(hwnd, &ps);
return 0 ;
--------------------- 

posted on 2019-08-05 18:21  激流勇进1  阅读(211)  评论(0编辑  收藏  举报