fix(draw_kit): reclaim 4x waveform oversample; relocate waveformColumnCount to component_geometry

kWaveformOversample set to 1 (was 4) — overbinning produced byte-identical pixels because columnMinMax exact partition already makes the draw gap-free. Comments credit columnMinMax, not oversampling.
This commit is contained in:
2026-07-27 19:37:53 -04:00
parent b3c9fad9ba
commit 1e645adcef
7 changed files with 67 additions and 40 deletions
+6 -10
View File
@@ -277,11 +277,6 @@ void drawListRow(LICE_IBitmap* bmp, const ListRowBox& row, const char* label,
}
}
int waveformColumnCount(const KitBox& box) {
const int w = box.width - 4; // fixed 2px inset each side (matches drawWaveform below)
return w > 0 ? w : 0;
}
void drawWaveform(LICE_IBitmap* bmp, const KitBox& box, const Envelope& env) {
if (!bmp || box.empty()) return;
@@ -311,11 +306,12 @@ void drawWaveform(LICE_IBitmap* bmp, const KitBox& box, const Envelope& env) {
if (bins.empty() || innerW <= 0) continue;
// Render one filled vertical span per pixel column. peaks::columnMinMax merges
// all bins that project to column `col` under the same partition as
// computeEnvelope, so every pixel column is covered with no gaps regardless of
// the bins-to-pixels ratio — callers oversample (kWaveformOversample bins per
// column) so each span shows true extremes. Same dB display compression
// everywhere (bank_grid, pure).
// all bins that project to column `col` under the exact same partition as
// computeEnvelope used to build the envelope, so every pixel column is covered
// with no gaps regardless of the bins-to-pixels ratio. With one bin per column
// (kWaveformOversample == 1) each span covers the true min/max of exactly the
// frames that fall in that column. Same dB display compression everywhere
// (bank_grid, pure).
for (int col = 0; col < innerW; ++col) {
const MinMax mm = columnMinMax(bins, innerW, col);
const int x = box.x + 2 + col;