| 7664 | } |
| 7665 | |
| 7666 | QRgb SpectrumWidget::dssStrengthToRgb(float s) const |
| 7667 | { |
| 7668 | // gamma in [0.25 .. 4]: gain=100 -> 0.25 (colour lifted to the noise floor), |
| 7669 | // gain=50 -> 1.0 (linear), gain=0 -> 4 (colour only on the strongest peaks). |
| 7670 | const float gamma = std::pow(4.0f, (50.0f - m_dssGain) / 50.0f); |
| 7671 | int n = 0; |
| 7672 | const auto* stops = wfSchemeStops(m_wfColorScheme, n); |
| 7673 | return interpolateGradient(std::pow(std::clamp(s, 0.0f, 1.0f), gamma), |
| 7674 | stops, n); |
| 7675 | } |
| 7676 | |
| 7677 | quint64 SpectrumWidget::dssPaletteToken() const |
| 7678 | { |
nothing calls this directly
no test coverage detected