Added missing support for inverting histogram on non-pseudocolor grayscale layers.

git-svn-id: http://svn.osgeo.org/qgis/trunk@408 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2004-01-04 10:40:40 +00:00
parent c9839c235b
commit f498bab6b9

View File

@ -271,6 +271,7 @@ void QgsRasterLayer::draw(QPainter * theQPainter, QgsRect * theViewExtent, QgsCo
{
myGrayValInt = static_cast<int>((255/myRangeDouble) * myGrayValInt);
}
if (invertHistogramFlag) myGrayValInt=255-myGrayValInt;
myQImage.setPixel( x, y, qRgba( myGrayValInt, myGrayValInt, myGrayValInt, transparencyLevelInt ));
}
else //render no data as 100% transparent