From 45a5fe720d101e25d6684b00f6612d8e1afdc597 Mon Sep 17 00:00:00 2001 From: olivierdalang Date: Tue, 29 Jan 2013 11:37:58 +0000 Subject: [PATCH] fix for composer map item's background when non-opaque --- src/core/composer/qgscomposermap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/composer/qgscomposermap.cpp b/src/core/composer/qgscomposermap.cpp index 931347e75c1..849fc1516d5 100644 --- a/src/core/composer/qgscomposermap.cpp +++ b/src/core/composer/qgscomposermap.cpp @@ -227,7 +227,8 @@ void QgsComposerMap::cache( void ) double forcedWidthScaleFactor = w / requestExtent.width() / mapUnitsToMM(); mCacheImage = QImage( w, h, QImage::Format_ARGB32 ); - mCacheImage.fill( brush().color().rgb() ); //consider the item background brush + mCacheImage.fill( QColor(255,255,255,0).rgba() ); // the background is drawn by composerItem, but we still need to start with that empty fill to avoid artifacts + double mapUnitsPerPixel = mExtent.width() / w; // WARNING: ymax in QgsMapToPixel is device height!!!