Mercurial > hg > svgui
comparison layer/Colour3DPlotRenderer.cpp @ 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 | dd3901fe8623 |
comparison
equal
deleted
inserted
replaced
1221:eaab8bab3522 | 1222:3ef162c9df00 |
---|---|
216 // the end. | 216 // the end. |
217 if (x0 == 0 && x1 == v->getPaintWidth()) { | 217 if (x0 == 0 && x1 == v->getPaintWidth()) { |
218 int peakCacheIndex = -1, binsPerPeak = -1; | 218 int peakCacheIndex = -1, binsPerPeak = -1; |
219 getPreferredPeakCache(v, peakCacheIndex, binsPerPeak); | 219 getPreferredPeakCache(v, peakCacheIndex, binsPerPeak); |
220 if (peakCacheIndex == -1) { // no peak cache | 220 if (peakCacheIndex == -1) { // no peak cache |
221 x0 = int(x1 * 0.3); | 221 double offset = 0.5 * (double(rand()) / double(RAND_MAX)); |
222 x0 = int(x1 * offset); | |
222 } | 223 } |
223 } | 224 } |
224 } | 225 } |
225 | 226 |
226 if (m_cache.isValid()) { | 227 if (m_cache.isValid()) { |