Skip to content

Commit

Permalink
Fix reprojected single band color drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 25, 2012
1 parent 60516a8 commit d9f3ac8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/raster/qgssinglebandcolordatarenderer.cpp
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit d9f3ac8

Please sign in to comment.