QtPBFImagePlugin/src/textpathitem.h
2018-11-11 14:10:38 +01:00

30 lines
566 B
C++

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