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/qgis@14910 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 14, 2010
1 parent 388cb16 commit 8655c440b260ae42bddb9be158c6e949a174ce5d
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 8655c44

Please sign in to comment.