Skip to content
Permalink
Browse files

copy WMS image if there is user transparency

git-svn-id: http://svn.osgeo.org/qgis/trunk@10267 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 9, 2009
1 parent f882040 commit 707550aeeeddaacfd1be8e41f14695aeb7a377f0
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/raster/qgsrasterlayer.cpp
@@ -1538,6 +1538,8 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )

if(mTransparencyLevel != 255) //improve performance if layer transparency not altered
{
QImage* transparentImageCopy = new QImage(*image); //copy image if there is user transparency
image = transparentImageCopy;
int myWidth = image->width();
int myHeight = image->height();
QRgb myRgb;
@@ -1569,6 +1571,11 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
),
*image );

if(mTransparencyLevel != 255)
{
delete image;
}

}
else
{

0 comments on commit 707550a

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