1 Attachment(s)
Legend icon not scaled with renderLegend
Hi,
I am rendering a QwtPlot on a pixmap using QwtPlotRenderer and a painter with painter.scale(8,8).
The whole plot is scaled correctly including the line on the plot and the legend text, but the legend line/icon is not scaled up.
The QwtPlotCurve pen is set to a width of 3.
Code:
const int scale = 8;
QPixmap pixmap
(width
*scale, height
*scale
);
painter.scale(scale,scale);
QRect rect
(0,
0,width,height
);
QwtPlotRenderer rend;
rend.render(plot, &painter, rect);
pixmap.save("pixmap.png");
I am using Qwt-6.1.0.
/Claus
1 Attachment(s)
Re: Legend icon not scaled with renderLegend
Hi,
it works for me (Qwt 6.3.0 from trunk) (see attached screenshot).
Please check if your pen has the cosmetic property set - in my case I specifically disable the cosmetic pen property when exporting the diagram to bitmap/vector.
Attachment 12857
Re: Legend icon not scaled with renderLegend
Recently I made a couple of fixes around pens and scaling of pens. Most of them went in all branches >= 6.2.
We also crossed a bug in the PDF engine, that should be fixed with Qt 5.11.1 ( see https://bugreports.qt.io/browse/QTBUG-68537 ).
Uwe