[Kst] double buffering

Alexander Semke Alexander.Semke at web.de
Thu Jan 1 10:26:54 UTC 2015

Hi all,

I'm struggling with a problem in LabPlot since a couple of days and cannot 
find a solution for that problem. Since a similar technique is used in kst I'd 
like to ask the question here. Maybe somebody has an idea...

In kst, in PlotItem::paint() you paint the pixmap created before with 
painter->drawPixmap(rect().topLeft(), _plotPixmap);

In LabPlot, the double-buffering is currently implemented for the xy-curve 
only. In XYCurvePrivate::paint() I have
painter->drawPixmap(boundingRectangle.topLeft(), m_pixmap);

Though the curve is (re)painted much faster now, as expected, the quality has 
worsen. Please take a look at the pictures attached. I also have to use 
painter->setRenderHint(QPainter::SmoothPixmapTransform, true);
Without this hint the quality is even more worse. I suspect the 
interpolation/extrapolation from the integer values of the bounding 
rectangular and the float numbers of QPixmap's size in QPainter::drawPixmap() 
to be responsible for the quality drop. But if this is true, the same problem 
should also occur in kst which I don't observe, though. You don't need to use 
the SmoothPixmapTransform-hint neither...

Do you have any idea on this issue?

Best regards and happy and productive New Year,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: with_double_buffer.jpg
Type: image/jpeg
Size: 51751 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kst/attachments/20150101/729cfaed/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: without_double_buffer.jpg
Type: image/jpeg
Size: 49964 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kst/attachments/20150101/729cfaed/attachment-0003.jpg>

More information about the Kst mailing list