QPainterPath 用法
来源:互联网 发布:淘宝店铺行业排名 编辑:程序博客网 时间:2024/06/07 11:02
- QPainterPath 中的 Path 可以理解为组成图形轮廓的线条。QPainterPath的对象是通过创建边界线的轨迹而形成的一个图形。
- 该对象交由 QPainter 类进行绘制
概述
示例
QPainterPath path; path.moveTo(20, 80); path.lineTo(20, 30); // 添加三次方贝赛尔曲线 path.cubicTo(80, 0, 50, 50, 80, 80); QPainter painter(this); // 此处的path可多次使用 painter.drawPath(path);
详解
组成一个 QPainterPath
- 创建一个 QPainterPath 对象,你可以使用空 Path、起点、或对象拷贝。
添加线条
// 使用以下函数添加不同线条 // 直线 lineTo(); // 圆弧 arcTo(); // 三次方贝赛尔曲线 cubicTo(); // 四方形 quadTo();
添加闭合线条(区域)
// 使用以下函数添加不同形状的区域 // 椭圆 addEllipse(); // 添加线条使其成为闭合图形 addPath(); //添加矩形 addRect(); // 添加区域 addRegion(); // 添加文本 addText(); // 添加多边形 addPolygon();
填充轮廓
// 使用这个类QPainterPathStroker
使轮廓内的元素逆序
QPainterPath QPainterPath::toReversed() const
0 0
- QPainterPath 用法
- QPainterPath
- QPainterPath
- QPainterPath
- QPainterPath 清除,重新画
- QPainterPath和qtpainter
- qt绘图 QPainterPath类
- Qt笔记之绘图QPainterpath
- QPainterPath在指定区域绘图
- Qt之图形(QPainterPath)
- Qt之图形(QPainterPath)
- 如何获取直线与QPainterPath的交点
- Qt 画布(基于QImage 以及 QPainterPath)
- QPainterPath(组合路径,路径运动)
- 使用QPainter、QPainterPath、QRegion绘图实践
- QT中QPainterPath类的功能和使用方法
- QT中QPainterPath类的功能和使用方法
- QT中QPainterPath类的功能和使用方法
- Android Token的作用
- VI 常用指令
- 题目1462:两船载物问题
- mac版 Intellij IDEA 弹窗报 this license XXXXXXXX has been cancelled
- 对于内存泄露的查找
- QPainterPath 用法
- [LeetCode]401. Binary Watch
- Error
- Tomcat源码分析 之 Tomcat如何监测部署应用的改变并进行重新部署
- Makefile 中:= ?= += =的区别
- 用Swift3实现n*n阶矩阵逆时针输出
- tensorflow 下的滑动平均模型 —— tf.train.ExponentialMovingAverage
- Maven集成至Myeclipse
- ubuntu tomcat自启动