Skip to content

Commit

Permalink
invert color fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Oct 24, 2012
1 parent 3284fcc commit 9a300d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/raster/qgssinglebandpseudocolorrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ QgsRasterBlock* QgsSingleBandPseudoColorRenderer::block( int bandNo, QgsRectangl
continue;
}

if ( mInvertColor )
{
// 1.8 was flipping blue and red
red = 255 - red;
green = 255 - green;
blue = 255 - blue;
}

if ( !hasTransparency )
{
outputBlock->setColor( i, qRgba( red, green, blue, 255 ) );
Expand Down

0 comments on commit 9a300d8

Please sign in to comment.