Skip to content
Permalink
Browse files

copy WMS image if there is user transparency

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10267 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 9, 2009
1 parent 5bb820b commit eed901151f0d02e600e36fb8e4ca6e2882913151
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 eed9011

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