예제 #1
0
        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);
            }
        }
예제 #2
0
 public Color GetColor(int index) => Pal.GetColor(index);