[Qgis-developer] Viewport rotation: QgsMapCanvasMap and angles
Sandro Santilli
strk at keybit.net
Wed Nov 26 09:37:51 PST 2014
After many hours trying to figure out who was ruining my vector data
angles I finally found the QgsMapCanvasMap::paint method complaining
about DIFFERENT SIZE of image and item.
Indeed the documentation for QPainter::drawImage(QRect, QImage) says
that the image is scaled to fit the rectangle, which in my case it meant
also ruining the angles (different aspect ratio between the two).
I tested and can confirm that passing the image size to QPainter::drawImage,
rather than the item size, fixes all the angles.
Unfortunately doing so also leaves some spurious rendered area not-cleared
and dunno what other damages it could do.
So my question now is: who's responsible for setting the bounding
rectangle of the map canvas _map_ item ?
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the Qgis-developer
mailing list