一个绘制眉毛形状的函数
2008-04-10 06:54
204 查看
void FontScoreDC::draw_poly_bezier(Point start, Point ctrl1, Point ctrl2, Point end, const Color& clr){ HBRUSH hBrush ; HBRUSH oldBrush ; POINT pt[8] ; hBrush = CreateSolidBrush(RGB(clr.r_, clr.g_, clr.b_)) ; oldBrush = (HBRUSH)SelectObject(m_hDC, hBrush) ; BeginPath(m_hDC) ; pt[0].x = start.x_ ;pt[0].y = start.y_ ; pt[1].x = ctrl1.x_ ;pt[1].y = ctrl1.y_ ; pt[2].x = ctrl2.x_ ;pt[2].y = ctrl2.y_ ; pt[3].x = end.x_ ;pt[3].y = end.y_ ; pt[4].x = end.x_ ;pt[4].y = end.y_ ; pt[5].x = ctrl2.x_ ;pt[5].y = ctrl2.y_ + 2 ; pt[6].x = ctrl1.x_ ;pt[6].y = ctrl1.y_ + 2 ; pt[7].x = start.x_ ;pt[7].y = start.y_ ; PolyBezier(m_hDC, pt, 4) ;PolyBezier(m_hDC, pt+4, 4) ; EndPath(m_hDC) ; FillPath(m_hDC) ; SelectObject(m_hDC, oldBrush) ; DeleteObject(hBrush) ;}
相关文章推荐
- 一个绘制眉毛形状的函数
- 一个绘制眉毛形状的函数
- OpenGL绘制一个矩形,并在窗口大小改变时保持它的形状
- 一个绘制虚线的非常规函数(常规方法,打印机上绘制不出虚线)
- 如何使用matplotlib绘制一个函数的图像
- 使用OpenGL绘制一个矩形,并在窗口大小改变时保持它的形状
- 在Dreamweaver下创建一个php文件并用正确使用php“绘图函数”进行绘制图形时,图形却无法显示
- 利用画布绘制一个函数图像(简易版)
- 一个绘制虚线的非常规函数(常规方法,打印机上绘制不出虚线)
- 一个函数与其导数的图象绘制
- QT 如何实现使用 QPainter 的 drawPixmap() 函数将图片文件绘制到一个 QLabel、QPushButton 或者其他的一些设备上?
- jq ui 的一个表单验证最大最小值范围函数 支持json
- cocos2d-x一个函数实现精灵变灰效果
- C/C++如何把一个特定分隔符分割的字符串划分为一个字符串数组,strtok(char *,char*)分割函数
- PHP写一个函数,能够遍历一个文件夹下的所有文件和子文件夹。
- 编写一个函数实现对单链表是否有环的判断
- 另开了一个线程,线程里面一个函数调用UpdateData(false),结果就出错,为什么?
- pygame初步(一)绘制一个运动的矩形
- 一个以引用作为参数的函数无法接收一个常量作为实参
- 写一个函数找出一个整数数组中,第二大的数