Skip to content
Permalink
Browse files
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
  • Loading branch information
mhugent committed Dec 14, 2010
1 parent 60fda2a commit 3a48287f128a277f0c43b05243e5ec4d6ffc6467
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/app/composer/qgscomposer.cpp
@@ -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 );

0 comments on commit 3a48287

Please sign in to comment.