mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-24 03:35:54 +01:00
30 lines
566 B
C++
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
|