QtPBFImagePlugin/src/textpathitem.h

30 lines
566 B
C
Raw Normal View History

2018-10-29 00:11:23 +01:00
#ifndef TEXTPATHITEM_H
#define TEXTPATHITEM_H
#include <QFont>
#include <QString>
#include "textitem.h"
2018-10-29 00:11:23 +01:00
class TextPathItem : public TextItem
2018-10-29 00:11:23 +01:00
{
public:
TextPathItem(const QString &text, const QPainterPath &path,
const QFont &font);
2018-10-29 00:11:23 +01:00
QPainterPath shape() const {return _shape;}
QRectF boundingRect() const {return _boundingRect;}
void paint(QPainter *painter) const;
2018-10-29 00:11:23 +01:00
void setPen(const QPen &pen) {_pen = pen;}
private:
QString _text;
QPainterPath _path;
QPainterPath _shape;
QRectF _boundingRect;
2018-10-29 00:11:23 +01:00
QFont _font;
QPen _pen;
};
#endif // TEXTPATHITEM_H