public void Render(IList <float> fftValues) { if (fftValues.IsEmpty()) { return; } using (LevelBmp.GetBitmapContext()) { var x = NextLine; for (var y = 0; y < fftValues.Count; y++) { var color = palette.GetColor(fftValues[y]); LevelBmp.SetPixel(x, Height - y - 1, color); } NextLine++; if (NextLine >= Width) { NextLine = 0; } RenderBlank(NextLine, BlankWidth); } }
public Color GetColor(int index) => Pal.GetColor(index);