Graphical distortions when drawing paths using Qt5

Bug #1210733 reported by Adam Reichold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
Medium
Adam Reichold

Bug Description

When using qpdfview with Qt5, there are graphical distortions when drawing paths for the "decorate links" function, c.f. attached screenshot. This happens independently of the format plug-in used, but since Poppler's Qt5 frontend had its first release, the problem becomes a bigger concern.

I did check that there is no difference in the rectangle and then paths that are read from the document files and if I replace the combination

painter.setTransform(m_normalizedTransform, true);
painter.drawPath(link->boundary);

by

painter.drawRect(m_normalizedTransform.map(link->boundary));

the distortions disappear. (But this seems a hack at best and also inconsistent with the other interfaces or QPainter.)

Also the detection of the mouse pointer position does not seem to be affected, so the program is perfectly usable with the "decorate links" setting disabled.

Revision history for this message
Adam Reichold (adamreichold) wrote :
Revision history for this message
Adam Reichold (adamreichold) wrote :

This is resolved in trunk revision 1215 by setting the Qt4 compatibility render hint of QPainter, but should be investigated further.

Changed in qpdfview:
status: Triaged → Fix Committed
Revision history for this message
Adam Reichold (adamreichold) wrote :

Thanks to help by Alexander Volkov who pointed out to me that Qt 5 scales the pen width using the painter transform, this is now properly fixed by using cosmetic pens, i.e. of width zero.

Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.