[Qt-interest] Graphics View & Printing

Utku Uzmen utkuuzmen at gmail.com
Sat Jan 23 20:38:15 CET 2010


Hi,

I have an application built around QGraphicsView, QGraphicsItem & friends,
and the application also needs to be able to print the graphics content with
good quality. The floating point coordinate space of the scene looks good on
screen with antialiasing, but apparently when the graphics are rendered in
the integer coordinate space of a printer, antialiasing isn't available and
the coordinates seem to be rounded to the nearest integers.

Imagine 10 black horizontal lines with the same thickness and same vertical
spacing distance in-between. Even if the thickness and distance values are
integers in the scene, they can end up as non-integer values when scaled to
a physical page. In the end the application prints 10 horizontal lines with
slightly but noticably differing thicknesses, which is not acceptable. (I
simply do scene.render() through a QPainter to a QPrinter)

Does anyone have any suggestions for working around this problem? Thanks in
advance.


Utku Uzmen

 




More information about the Qt-interest-old mailing list