src/gl/common.h

changeset 245
a41ccc6924e3
parent 231
a9bf6bab5ea2
child 250
2837b549e616
equal deleted inserted replaced
244:065db0753f05 245:a41ccc6924e3
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 }

mercurial