Set view box for svg export explicitely (thanks to JD)

git-svn-id: http://svn.osgeo.org/qgis/trunk@14910 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2010-12-14 16:13:42 +00:00
parent 60fda2ab11
commit 3a48287f12

View File

@ -818,6 +818,7 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
//height in pixel
int height = ( int )( mComposition->paperHeight() * mComposition->printResolution() / 25.4 );
generator.setSize( QSize( width, height ) );
generator.setViewBox( QRect( 0, 0, width, height ) );
generator.setResolution( mComposition->printResolution() ); //because the rendering is done in mm, convert the dpi
QPainter p( &generator );