src/gl/common.h

changeset 245
a41ccc6924e3
parent 231
a9bf6bab5ea2
child 250
2837b549e616
--- a/src/gl/common.h	Mon Jun 20 22:41:34 2022 +0300
+++ b/src/gl/common.h	Mon Jun 20 22:54:13 2022 +0300
@@ -146,3 +146,16 @@
 {
 	return stream >> enum_value_cast(style);
 }
+
+#include <QPainter>
+#include <QPainterPath>
+inline void drawBorderedText(QPainter* painter, const QPointF& point, const QFont& font, const QString& text)
+{
+	QPainterPath path;
+	path.addText(point, font, text);
+	painter->save();
+	painter->setBrush(Qt::white);
+	painter->setPen({Qt::black, 0.1 * font.pointSizeF()});
+	painter->drawPath(path);
+	painter->restore();
+}

mercurial