5 Star 1 Fork 0

tjss / drawing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
curveitem.h 602 Bytes
一键复制 编辑 原始数据 按行查看 历史
kitfrankenstein 提交于 2018-12-16 16:39 . 增加插入图片
#ifndef CURVEITEM_H
#define CURVEITEM_H
#include <QPainter>
#include <QGraphicsItem>
/**
* @brief The CurveItem class
* 自定义曲线
*/
class CurveItem : public QGraphicsLineItem
{
public:
explicit CurveItem(QGraphicsItem *parent = Q_NULLPTR);
CurveItem(qreal x1, qreal y1 , qreal x2, qreal y2, QGraphicsItem *parent = Q_NULLPTR);
CurveItem(const QLineF &line, QGraphicsItem *parent = Q_NULLPTR);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
QPainterPath path;
};
#endif // CURVEITEM_H
1
https://gitee.com/tjssqn/drawing.git
git@gitee.com:tjssqn/drawing.git
tjssqn
drawing
drawing
master

搜索帮助