private void RefrashPictures(PictureBox[] pbs, Action <PixelFormat, FastBitmap.MyColor, FastBitmap.MyColor>[] map)
 {
     Bitmap[] bmps = bitmap.Map(map);
     for (int i = 0; i < pbs.Length; ++i)
     {
         pbs[i].Image?.Dispose();
         pbs[i].Image = bmps[i];
     }
 }
예제 #2
0
        public void Show(FastBitmap bitmap)
        {
            var res = bitmap.Map(_monochromatics
                                 .Select <Monochromatic, FastBitmap.PixelMap>(monochromatic => monochromatic.PixelMapper).ToArray());

            for (var i = 0; i < _pictures.Count; i++)
            {
                _pictures[i].Image?.Dispose();
                _pictures[i].Image = res[i];
            }

            _chart.Series.Clear();
            foreach (var g in _monochromatics)
            {
                var s      = g.Name;
                var series = new Series(s)
                {
                    Name      = s,
                    ChartType = SeriesChartType.Area,
                    ChartArea = s,
                    Legend    = LegendName,
                    Color     = g.HistogramColor,
                };
                foreach (var y in g.Histogram)
                {
                    series.Points.Add(y);
                }
                _chart.Series.Add(series);
                _chart.ChartAreas[s].RecalculateAxesScale();
            }
        }