示例#1
0
        private void SetHistograms(ImageHistogramData data)
        {
            SeriesCollection SeriesCollectionR = new SeriesCollection
            {
                new ColumnSeries
                {
                    Title  = "Red",
                    Values = new ChartValues <int>(data.R.AsEnumerable()),
                    Fill   = new SolidColorBrush(Colors.Red)
                }
            };

            RPlot.Series = SeriesCollectionR;

            SeriesCollection SeriesCollectionG = new SeriesCollection
            {
                new ColumnSeries
                {
                    Title  = "Green",
                    Values = new ChartValues <int>(data.G.AsEnumerable()),
                    Fill   = new SolidColorBrush(Colors.Green)
                }
            };

            GPlot.Series = SeriesCollectionG;

            SeriesCollection SeriesCollectionB = new SeriesCollection
            {
                new ColumnSeries
                {
                    Title  = "Blue",
                    Values = new ChartValues <int>(data.B.AsEnumerable()),
                    Fill   = new SolidColorBrush(Colors.Blue)
                }
            };

            BPlot.Series = SeriesCollectionB;

            SeriesCollection SeriesCollectionC = new SeriesCollection
            {
                new ColumnSeries
                {
                    Title  = "(R+G+B)/3",
                    Values = new ChartValues <int>(data.C.AsEnumerable()),
                    Fill   = new SolidColorBrush(Colors.Black)
                }
            };

            CPlot.Series = SeriesCollectionC;
        }
示例#2
0
 private void UpdateHistograms()
 {
     bitmapHistogramData = new ImageHistogramData(editingBitmap);
     SetHistograms(bitmapHistogramData);
 }