Skip to content

Commit

Permalink
[composer] Allow exporting compositions with transparent backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 17, 2013
1 parent d0b84e6 commit c3ec3b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/composer/qgscomposition.cpp
Expand Up @@ -2227,7 +2227,11 @@ void QgsComposition::renderPage( QPainter* p, int page )
mPlotStyle = QgsComposition::Print;

setSnapLinesVisible( false );
//hide background before rendering
setBackgroundBrush( Qt::NoBrush );
render( p, QRectF( 0, 0, paintDevice->width(), paintDevice->height() ), paperRect );
//show background after rendering
setBackgroundBrush( Qt::gray );
setSnapLinesVisible( true );

mPlotStyle = savedPlotStyle;
Expand Down

0 comments on commit c3ec3b2

Please sign in to comment.