Mercurial > hg > svgui
changeset 1222:3ef162c9df00
Randomise start offset for partial paints, it looks (I think) a little better
author | Chris Cannam |
---|---|
date | Thu, 26 Jan 2017 12:04:03 +0000 |
parents | eaab8bab3522 |
children | 312f99a9f2aa |
files | layer/Colour3DPlotRenderer.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp Thu Jan 26 11:55:11 2017 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Thu Jan 26 12:04:03 2017 +0000 @@ -218,7 +218,8 @@ int peakCacheIndex = -1, binsPerPeak = -1; getPreferredPeakCache(v, peakCacheIndex, binsPerPeak); if (peakCacheIndex == -1) { // no peak cache - x0 = int(x1 * 0.3); + double offset = 0.5 * (double(rand()) / double(RAND_MAX)); + x0 = int(x1 * offset); } } }