Fix reprojected single band color drawing

This commit is contained in:
Marco Hugentobler 2012-06-25 21:07:25 +02:00
parent 60516a88f9
commit d9f3ac8cc8

View File

@ -83,10 +83,12 @@ void QgsSingleBandColorDataRenderer::draw( QPainter* p, QgsRasterViewPort* viewP
}
else
{
QRgb pixelColor;
for ( int j = 0; j < nRasterCols; ++j )
{
QRgb c((( uint* )( rasterData ) )[currentRasterPos] );
scanLine[i] = qRgba( qRed( c ), qGreen( c ), qBlue( c ), 255 );
pixelColor = qRgba( qRed( c ), qGreen( c ), qBlue( c ), 255 );
memcpy( &( scanLine[j*4] ), &pixelColor, 4 );
++currentRasterPos;
}
}