Skip to content
Permalink
Browse files

reset brush before raster layer draw, fixes #7766

  • Loading branch information
blazek committed Jun 7, 2013
1 parent 1cce268 commit 0881643e0b25465c55f54818d1bc7a90729574fe
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/raster/qgsrasterdrawer.cpp
@@ -83,6 +83,12 @@ void QgsRasterDrawer::drawImage( QPainter* p, QgsRasterViewPort* viewPort, const
QPoint tlPoint = QPoint( viewPort->mTopLeftPoint.x() + topLeftCol, viewPort->mTopLeftPoint.y() + topLeftRow );
p->save();
p->setRenderHint( QPainter::Antialiasing, false );

// Blending problem was reported with PDF output if backgroud color has alpha < 255
// in #7766, it seems to be a bug in Qt, setting a brush with alpha 255 is a workaround
// which should not harm anything
p->setBrush( QBrush( QColor( Qt::white ), Qt::NoBrush ) );

p->drawImage( tlPoint, img );
p->restore();
}

0 comments on commit 0881643

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