예제 #1
0
        public void CanvasRefresh()
        {
            this.GraphCanvas.Children.Clear();
            this.rangedPlotter.CanvasDimensions = new Point(this.GraphCanvas.ActualWidth, this.GraphCanvas.ActualHeight);
            this.DrawCoord();

            Text(GraphCanvas.ActualWidth / 2 + 10, GraphCanvas.ActualHeight - 5, ("" + this.rangedPlotter.YMax), Colors.Black);
            Text(GraphCanvas.ActualWidth / 2 + 10, 26, ("" + this.rangedPlotter.YMin), Colors.Black);
            Text(GraphCanvas.ActualWidth - 30, GraphCanvas.ActualHeight / 2 - 10, ("" + this.rangedPlotter.XMax), Colors.Black);
            Text(10, GraphCanvas.ActualHeight / 2 - 10, ("" + this.rangedPlotter.XMin), Colors.Black);

            List <List <Point> > points = rangedPlotter.GetPoints();

            foreach (var item in points)
            {
                GraphTools.AddPolyLine(this.GraphCanvas, item);
            }
        }
예제 #2
0
 public void DrawCoord()
 {
     GraphTools.AddCoordLine(this.GraphCanvas, 0, this.GraphCanvas.ActualHeight / 2, this.GraphCanvas.ActualWidth, this.GraphCanvas.ActualHeight / 2);
     GraphTools.AddCoordLine(this.GraphCanvas, this.GraphCanvas.ActualWidth / 2, 0, this.GraphCanvas.ActualWidth / 2, this.GraphCanvas.ActualHeight);
 }