Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
reset brush before raster layer draw, fixes #7766
  • Loading branch information
blazek committed Jun 7, 2013
1 parent 1cce268 commit 0881643
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/raster/qgsrasterdrawer.cpp
Expand Up @@ -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();
}
Expand Down

0 comments on commit 0881643

Please sign in to comment.