mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 18:15:52 +08:00
JKQTMathText: resetting pen and brush before drawing, so the previously set pen/brush does not influence the rendering result
This commit is contained in:
parent
7f206882c1
commit
4bd7444c66
@ -1194,6 +1194,8 @@ void JKQTMathText::draw(QPainter &painter, QPointF x, bool drawBoxes)
|
||||
double JKQTMathText::draw(QPainter& painter, double x, double y, bool drawBoxes){
|
||||
if (getNodeTree()!=nullptr) {
|
||||
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
|
||||
painter.setPen(fontColor);
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
JKQTMathTextEnvironment ev;
|
||||
ev.color=fontColor;
|
||||
ev.fontSize=fontSize;
|
||||
@ -1208,6 +1210,8 @@ double JKQTMathText::draw(QPainter& painter, double x, double y, bool drawBoxes)
|
||||
void JKQTMathText::draw(QPainter& painter, unsigned int flags, QRectF rect, bool drawBoxes) {
|
||||
if (getNodeTree()!=nullptr) {
|
||||
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
|
||||
painter.setPen(fontColor);
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
|
||||
JKQTMathTextEnvironment ev;
|
||||
ev.color=fontColor;
|
||||
|
Loading…
Reference in New Issue
Block a user