Skip to content
Permalink
Browse files

Fix resolution in image export

  • Loading branch information
mhugent committed Jul 17, 2012
1 parent b45d853 commit cabff38120d4f6be20f2986fafc83de1fcb20d56
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/app/composer/qgscomposer.cpp
@@ -705,6 +705,9 @@ void QgsComposer::on_mActionExportAsImage_triggered()
return;
}

QgsComposition::PlotStyle savedPlotStyle = mComposition->plotStyle();
mComposition->setPlotStyle( QgsComposition::Print );

for ( int i = 0; i < mComposition->numPages(); ++i )
{
QImage image = printPageAsRaster( i );
@@ -719,6 +722,8 @@ void QgsComposer::on_mActionExportAsImage_triggered()
image.save( outputFilePath, fileNExt.second.toLocal8Bit().constData() );
}
}

mComposition->setPlotStyle( savedPlotStyle );
}


@@ -772,6 +777,8 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
}

settings.setValue( "/UI/lastSaveAsSvgFile", outputFileName );

QgsComposition::PlotStyle savedPlotStyle = mComposition->plotStyle();
mComposition->setPlotStyle( QgsComposition::Print );

mView->setPaintingEnabled( false );
@@ -805,8 +812,9 @@ void QgsComposer::on_mActionExportAsSVG_triggered()

mComposition->renderPage( &p, i );
p.end();
mComposition->setPlotStyle( QgsComposition::Preview );
}

mComposition->setPlotStyle( savedPlotStyle );
mView->setPaintingEnabled( true );
}

0 comments on commit cabff38

Please sign in to comment.
You can’t perform that action at this time.