[Qgis-developer] Composer map size and extent

Marco Hugentobler marco.hugentobler at sourcepole.ch
Thu May 9 23:50:55 PDT 2013


Hi Alexander

Afaik if you set the new extent such that the width/height ration of the 
extent is the same as the item's one, it won't change size.
Another possibility is to set the new extent and call setSceneRect() 
just after that.

For the scale: QgsComposerMap::setNewScale should not change the item 
widht/height.

Regards,
Marco

On 08.05.2013 09:15, Alexander Bruy wrote:
> Hi all,
>
> is it possible to change composer map extent (and scale) programmatically without changing its width and height? When using setNewExtent() method width and height of the composer map frame
> changed and overlaps with other composer elements, so resulting
> image looks differently from template.
>


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee



More information about the Qgis-developer mailing list