144 |
144 |
145 inline QDataStream &operator>>(QDataStream& stream, gl::RenderStyle& style) |
145 inline QDataStream &operator>>(QDataStream& stream, gl::RenderStyle& style) |
146 { |
146 { |
147 return stream >> enum_value_cast(style); |
147 return stream >> enum_value_cast(style); |
148 } |
148 } |
|
149 |
|
150 #include <QPainter> |
|
151 #include <QPainterPath> |
|
152 inline void drawBorderedText(QPainter* painter, const QPointF& point, const QFont& font, const QString& text) |
|
153 { |
|
154 QPainterPath path; |
|
155 path.addText(point, font, text); |
|
156 painter->save(); |
|
157 painter->setBrush(Qt::white); |
|
158 painter->setPen({Qt::black, 0.1 * font.pointSizeF()}); |
|
159 painter->drawPath(path); |
|
160 painter->restore(); |
|
161 } |