Skip to content
Permalink
Browse files

Transparency for WMS rendering

  • Loading branch information
mhugent committed Jun 25, 2012
1 parent d9f3ac8 commit 7cec992b994300a5c6a9c810d7103d863399a428
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/raster/qgssinglebandcolordatarenderer.cpp
@@ -84,10 +84,12 @@ void QgsSingleBandColorDataRenderer::draw( QPainter* p, QgsRasterViewPort* viewP
else
{
QRgb pixelColor;
double alpha = 255.0;
for ( int j = 0; j < nRasterCols; ++j )
{
QRgb c((( uint* )( rasterData ) )[currentRasterPos] );
pixelColor = qRgba( qRed( c ), qGreen( c ), qBlue( c ), 255 );
alpha = qAlpha( c );
pixelColor = qRgba( qRed( c ), qGreen( c ), qBlue( c ), mOpacity * alpha );
memcpy( &( scanLine[j*4] ), &pixelColor, 4 );
++currentRasterPos;
}

0 comments on commit 7cec992

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