一个绘制眉毛形状的函数
2008-03-11 10:51
134 查看
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 或者其他的一些设备上?
- 终于手动做好了第一个稍微有的形状的MFC程序~一个简陋的图形绘图工具收藏(更新至1.1版)
- 如何将二维数组作为参数传给一个函数
- 一个javascript的Math对象的方法实现,将字符串,转换成实际函数
- js 所传参数为一个函数体 的 函数调用
- c++ thinking, 在一个文件中只是实现了部分虚函数
- 刚刚在看52单片机和GPS通信程序的时候,看到了一个函数,absacc.h,貌似从来没有遇到过,百度了一下,结合自己的理解,整理如下: http://blog.sina.com.cn/s/blog_4
- Scala 闭包(闭包是一个函数)
- 给你一个能生成1到5随机数的函数,用它写一个函数生成1到7的随机数。 (即,使用函数rand5()来实现函数rand7())
- 一个 Qt 显示图片的控件(继承QWidget,使用QPixmap记录图像,最后在paintEvent进行绘制,可缩放)