[Qt-interest] Scale painter coordinates, not pen widths?

Andrea Franceschini therealmorpheu5 at gmail.com
Wed Mar 25 15:48:06 CET 2009


I have a bunch of objects containing shapes centered in (0,0)
extending in the four quadrants of the plane, which arrangement I find
quite reasonable for my purposes. The problem is that when I rotate,
scale and translate the world matrix of the painter (according to the
specific property of each object) also the pen gets translated, so if
I specify a pen width of 1, it may result in extremely huge strokes
(for example if I map my polygons into (20,20,40,400), I have a stroke
width of 20.

Is there a way to just scale the coordinates and not the pen using the
painter or am I forced to do the transforms independently via
QMatrix/QTransform?

-- 
Andrea



More information about the Qt-interest-old mailing list