您的位置:首页 > 其它

常用的用来绘制图形的win32GDI函数

2009-11-13 21:55 411 查看
一.LineTo 画直线

BOOL LineTo(

HDC hdc,    // device context handle

int nXEnd,  // x-coordinate of ending point

int nYEnd   // y-coordinate of ending point

);


二.使用Polyline和Polylineto 画一系列相连的直线
PolyPolyline 画多组相连的线
Arc 画椭圆线
PolyBesier 和PolyBesierTo 画贝赛尔样条

三.Rectangle 画矩形
BOOL Rectangle(

HDC hdc,         // handle to DC

int nLeftRect,   // x-coord of upper-left corner of rectangle

int nTopRect,    // y-coord of upper-left corner of rectangle

int nRightRect,  // x-coord of lower-right corner of rectangle

int nBottomRect  // y-coord of lower-right corner of rectangle

);


四.使用Ellipse 画椭圆

BOOL Ellipse(

HDC hdc,        // handle to DC

int nLeftRect,  // x-coord of upper-left corner of rectangle

int nTopRect,   // y-coord of upper-left corner of rectangle

int nRightRect, // x-coord of lower-right corner of rectangle

int nBottomRect // y-coord of lower-right corner of rectangle

);


五.RoundRect 画带圆角的矩形
BOOL RoundRect(HDC hdc,
int nLeftRect,         //指定矩形左上角的X坐标
int nTopRect,          //指定矩形左上角的Y坐标
int nRightRect,        //指定矩形右下角的X坐标
int nBottomRect,       //指定矩形右下角的Y坐标
int nWidth,            //指定用来画圆角的椭圆的宽
int nHeight);           //指定用来画圆角的椭圆的高

Pie 画椭圆的一部分,使其看起来像一个扇形
Chord 画椭圆的一部分,以成弓形
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: