diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-24 12:59:38 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-24 13:07:31 +0300 |
commit | 02cea907917a09f66e60dd5005f53780086df7e6 (patch) | |
tree | 1e4460bdc7fdc7ac908a21a14d391a82570801ad /src/datavisualization/data/qheightmapsurfacedataproxy.cpp | |
parent | 467b7f3ef70b5e4ad898de2369af1567b1128326 (diff) |
Zero-color gradient fix for surface
Task-number: QTRD-2329
Change-Id: I616e2e97ac67ddd9fbdf2d0715f5841b3df46561
Change-Id: I616e2e97ac67ddd9fbdf2d0715f5841b3df46561
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/data/qheightmapsurfacedataproxy.cpp')
-rw-r--r-- | src/datavisualization/data/qheightmapsurfacedataproxy.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp index f40fa395..25e2a4db 100644 --- a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp +++ b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp @@ -213,7 +213,7 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve() for (int i = imageHeight; i > 0; i--, bitCount -= widthBits) { QSurfaceDataRow *newRow = new QSurfaceDataRow(imageWidth); for (int j = 0; j < imageWidth; j++) - (*newRow)[j] = qreal(bits[bitCount + (j * 4)]) + 0.1; // Add 0.1 to raise it above ground to avoid glimmering at 0 height + (*newRow)[j] = qreal(bits[bitCount + (j * 4)]); *dataArray << newRow; } } else { @@ -225,7 +225,7 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve() height = (qreal(bits[bitCount + nextpixel]) + qreal(bits[1 + bitCount + nextpixel]) + qreal(bits[2 + bitCount + nextpixel])); - (*newRow)[j] = (height / 3.0) + 0.1; // Add 0.1 to raise it above ground to avoid glimmering at 0 height + (*newRow)[j] = (height / 3.0); } *dataArray << newRow; } |