mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix reprojected single band color drawing
This commit is contained in:
parent
60516a88f9
commit
d9f3ac8cc8
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user