name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-5572165936844014&dt=1193665761703&lmt=1193665780&format=336x280_as&output=html&correlator=1193665761687&url=http%3A%2F%2Fwww.codeguru.cn%2Fpublic%2Fiframe%2Fwinapiiframe.htm&color_bg=FFFFFF&color_text=000000&color_link=000000&color_url=FFFFFF&color_border=FFFFFF&ad_type=text&ga_vid=1285758818.1193665762&ga_sid=1193665762&ga_hid=111695597&flash=9&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=32&u_tz=480&u_his=8&u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="allowtransparency">
函数功能:该函数画一个由椭圆和两条半径相交闭合而成的饼状楔形图,此饼图由当前画笔画轮廓,由当前画刷填充。
函数原型:BOOL Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2, int nYRadial2);
参数:
hdc:设备环境句柄。
nLeftRect:指定限定矩形左上角的X坐标。
nTopRect:指定限定矩形左上角的Y坐标。
nRigthRect:指定限定矩形右下角的X坐标。
nBottomRect:指定限定矩形右下角的Y坐标。
nXRadial1:指定第一条半径的端点的X坐标。
nYRadial1:指定第一条半径的端点的Y坐标。
nXRadial2:指定第二条半径的端点的X坐标。
nYRadial2:指定第二条半径的端点的Y坐标。
返回值:如果函数调用成功,返回值非零;如果函数调用失败,返回值是0。
Windows:要得到更多的错误信息,调用GetLastError。
备注:饼图的曲线是由符合限定矩形的椭圆定义的。曲线的起始点在椭圆与第一条半径的交点处,然后沿逆时针方向延伸,直到椭圆与第二条半径的交点处(一条半径是指从椭圆中心到椭圆上指定点之间的线段)。
函数Pie不使用和改变当前的位置。
Windows 95和Windows 98:限定矩形的坐标之和不能超过32767。nLeftRect和nRightRect之和或nTopRect和nBottomRect之和均不能超过32767。
速查:Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:不支持;头文件:wingdi.h;库文件:gdi32.lib。
函数原型:BOOL Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2, int nYRadial2);
参数:
hdc:设备环境句柄。
nLeftRect:指定限定矩形左上角的X坐标。
nTopRect:指定限定矩形左上角的Y坐标。
nRigthRect:指定限定矩形右下角的X坐标。
nBottomRect:指定限定矩形右下角的Y坐标。
nXRadial1:指定第一条半径的端点的X坐标。
nYRadial1:指定第一条半径的端点的Y坐标。
nXRadial2:指定第二条半径的端点的X坐标。
nYRadial2:指定第二条半径的端点的Y坐标。
返回值:如果函数调用成功,返回值非零;如果函数调用失败,返回值是0。
Windows:要得到更多的错误信息,调用GetLastError。
备注:饼图的曲线是由符合限定矩形的椭圆定义的。曲线的起始点在椭圆与第一条半径的交点处,然后沿逆时针方向延伸,直到椭圆与第二条半径的交点处(一条半径是指从椭圆中心到椭圆上指定点之间的线段)。
函数Pie不使用和改变当前的位置。
Windows 95和Windows 98:限定矩形的坐标之和不能超过32767。nLeftRect和nRightRect之和或nTopRect和nBottomRect之和均不能超过32767。
速查:Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:不支持;头文件:wingdi.h;库文件:gdi32.lib。