1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 07:13:21 +02:00
GPXSee/src/map/IMG/textpathitem.h

30 lines
660 B
C
Raw Normal View History

2019-05-10 18:56:19 +02:00
#ifndef TEXTPATHITEM_H
#define TEXTPATHITEM_H
#include <QVector>
#include <QPainterPath>
#include "textitem.h"
2019-05-10 18:56:19 +02:00
class TextPathItem : public TextItem
2019-05-10 18:56:19 +02:00
{
public:
2020-10-17 14:26:59 +02:00
TextPathItem() : TextItem(0), _font(0), _color(0) {}
2019-05-10 18:56:19 +02:00
TextPathItem(const QPolygonF &line, const QString *label,
const QRect &tileRect, const QFont *font, const QColor *color);
bool isValid() const {return !_path.isEmpty();}
QPainterPath shape() const {return _shape;}
QRectF boundingRect() const {return _rect;}
2019-05-10 18:56:19 +02:00
void paint(QPainter *painter) const;
private:
const QFont *_font;
const QColor *_color;
QPainterPath _path;
QRectF _rect;
QPainterPath _shape;
};
#endif // TEXTPATHITEM_H