Skip to content

Commit c3ec3b2

Browse files
committed
[composer] Allow exporting compositions with transparent backgrounds
1 parent d0b84e6 commit c3ec3b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/composer/qgscomposition.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,11 @@ void QgsComposition::renderPage( QPainter* p, int page )
22272227
mPlotStyle = QgsComposition::Print;
22282228

22292229
setSnapLinesVisible( false );
2230+
//hide background before rendering
2231+
setBackgroundBrush( Qt::NoBrush );
22302232
render( p, QRectF( 0, 0, paintDevice->width(), paintDevice->height() ), paperRect );
2233+
//show background after rendering
2234+
setBackgroundBrush( Qt::gray );
22312235
setSnapLinesVisible( true );
22322236

22332237
mPlotStyle = savedPlotStyle;

0 commit comments

Comments
 (0)