Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            LoadPixelData();

            var throttledEvent = new ThrottledMouseMoveEvent(image);

            throttledEvent.ThrottledMouseMove += ThrottledEvent_ThrottledMouseMove;
            var pm = new PlotModel("RGB histogram");

            redLine          = new LineSeries(OxyColors.Red);
            greenLine        = new LineSeries(OxyColors.Green);
            blueLine         = new LineSeries(OxyColors.Blue);
            redLine.Smooth   = true;
            greenLine.Smooth = true;
            blueLine.Smooth  = true;
            pm.Series.Add(redLine);
            pm.Series.Add(greenLine);
            pm.Series.Add(blueLine);
            pm.PlotMargins = new OxyThickness(60, 0, 0, 30);
            pm.Axes.Add(new LinearAxis(AxisPosition.Left, 0, 1, 0.2, 0.05, "Frequency"));
            pm.Axes.Add(new LinearAxis(AxisPosition.Bottom, 0, 100, "Lightness"));
            chart.Model = pm;
        }
Esempio n. 2
0
        public MainWindow()
        {
            this.InitializeComponent();

            this.LoadPixelData();

            var throttledEvent = new ThrottledMouseMoveEvent(image);
            throttledEvent.ThrottledMouseMove += this.ThrottledEvent_ThrottledMouseMove;
            var pm = new PlotModel { Title = "RGB histogram" };
            this.redLine = new LineSeries { Color = OxyColors.Red };
            this.greenLine = new LineSeries { Color = OxyColors.Green };
            this.blueLine = new LineSeries { Color = OxyColors.Blue };
            this.redLine.Smooth = true;
            this.greenLine.Smooth = true;
            this.blueLine.Smooth = true;
            pm.Series.Add(this.redLine);
            pm.Series.Add(this.greenLine);
            pm.Series.Add(this.blueLine);
            pm.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Minimum = 0, Maximum = 1, MajorStep = 0.2, MinorStep = 0.05, Title = "Frequency" });
            pm.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Minimum = 0, Maximum = 100, Title = "Lightness" });
            chart.Model = pm;
        }
        public MainWindow()
        {
            InitializeComponent();

            LoadPixelData();

            var throttledEvent = new ThrottledMouseMoveEvent(image);
            throttledEvent.ThrottledMouseMove += ThrottledEvent_ThrottledMouseMove;
            var pm = new PlotModel("RGB histogram");
            redLine = new LineSeries(OxyColors.Red);
            greenLine = new LineSeries(OxyColors.Green);
            blueLine = new LineSeries(OxyColors.Blue);
            redLine.Smooth = true;
            greenLine.Smooth = true;
            blueLine.Smooth = true;
            pm.Series.Add(redLine);
            pm.Series.Add(greenLine);
            pm.Series.Add(blueLine);
            pm.PlotMargins = new OxyThickness(60,0,0,30);
            pm.Axes.Add(new LinearAxis(AxisPosition.Left, 0, 1, 0.2, 0.05, "Frequency"));
            pm.Axes.Add(new LinearAxis(AxisPosition.Bottom, 0, 100, "Lightness"));
            chart.Model = pm;
        }
        public MainWindow()
        {
            this.InitializeComponent();

            this.LoadPixelData();

            var throttledEvent = new ThrottledMouseMoveEvent(image);

            throttledEvent.ThrottledMouseMove += this.ThrottledEvent_ThrottledMouseMove;
            var pm = new PlotModel {
                Title = "RGB histogram"
            };

            this.redLine = new LineSeries {
                Color = OxyColors.Red
            };
            this.greenLine = new LineSeries {
                Color = OxyColors.Green
            };
            this.blueLine = new LineSeries {
                Color = OxyColors.Blue
            };
            this.redLine.Smooth   = true;
            this.greenLine.Smooth = true;
            this.blueLine.Smooth  = true;
            pm.Series.Add(this.redLine);
            pm.Series.Add(this.greenLine);
            pm.Series.Add(this.blueLine);
            pm.Axes.Add(new LinearAxis {
                Position = AxisPosition.Left, Minimum = 0, Maximum = 1, MajorStep = 0.2, MinorStep = 0.05, Title = "Frequency"
            });
            pm.Axes.Add(new LinearAxis {
                Position = AxisPosition.Bottom, Minimum = 0, Maximum = 100, Title = "Lightness"
            });
            chart.Model = pm;
        }