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

Alessandro Portale alessandro.portale at trolltech.com
Wed Mar 25 15:52:28 CET 2009


Hi,

did you try QPen::setCosmetic() ?
   http://doc.trolltech.com/latest/qpen.html#isCosmetic

Saluti,
Alessandro

Andrea Franceschini wrote:
> 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?



More information about the Qt-interest-old mailing list