Re: Porting from Qwt5 to Qwt6: QwtMetricsMap
Brought to you by:
rathmann
|
From: Uwe R. <Uwe...@ti...> - 2019-09-04 09:45:09
|
On 9/4/19 9:43 AM, ams...@we... wrote: > I am porting an old application from Qwt5 to Qwt6 and I don't know how > to port the followin code as in Qwt6, the class QwtMetricsMap has > disappeared: QPainter offers a floating point based API since Qt4 and as Qwt6 does not support Qt3 anymore there is no reason for scaling coordinates manually according to the resolution of the paint device. Instead you can simply use QPainter::setWorldMatrix and friends. Don't know the context of your code - but if it helps you can have a look at the implementation of QwtPlotRenderer::render. In QwtPlotRenderer::renderDocument you can see how QPdfWriter can be initialized to match a given physical size and resolution. HTH, Uwe |