Skip to content
Permalink
Browse files

Fix reprojected single band color drawing

  • Loading branch information
mhugent committed Jun 25, 2012
1 parent 60516a8 commit d9f3ac8cc8b3a31b3ad6ad9934cff4593b9ddb7b
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/raster/qgssinglebandcolordatarenderer.cpp
@@ -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;
}
}

0 comments on commit d9f3ac8

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