88 }, |
88 }, |
89 }); |
89 }); |
90 this->shader.bufferData(&data[0], countof(data), sizeof data[0]); |
90 this->shader.bufferData(&data[0], countof(data), sizeof data[0]); |
91 } |
91 } |
92 |
92 |
93 void drawBorderedText(QPainter* painter, const QPointF& point, const QFont& font, const QString& text) |
|
94 { |
|
95 QPainterPath path; |
|
96 path.addText(point, font, text); |
|
97 painter->save(); |
|
98 painter->setBrush(Qt::white); |
|
99 painter->setPen({Qt::black, 0.1 * font.pointSizeF()}); |
|
100 painter->drawPath(path); |
|
101 painter->restore(); |
|
102 } |
|
103 |
|
104 void AxesLayer::overpaint(QPainter* painter) |
93 void AxesLayer::overpaint(QPainter* painter) |
105 { |
94 { |
|
95 painter->save(); |
106 QFont font; |
96 QFont font; |
107 font.setStyle(QFont::StyleItalic); |
97 font.setStyle(QFont::StyleItalic); |
108 font.setBold(true); |
98 font.setBold(true); |
109 painter->setFont(font); |
99 painter->setFont(font); |
110 QFontMetrics fontMetrics{font}; |
100 QFontMetrics fontMetrics{font}; |