Exemple #1
0
        private void DrawVerticalGridLines(DrawingContext drawingContext, DrawSetting drawSetting)
        {
            double scaleGraphStep = drawSetting.GetScaleGrapthStep();

            int stepCounterHorizontalAxis23 = 0;

            for (double i = drawSetting.BasePoint.X; i > 0; i = i - scaleGraphStep)
            {
                drawingContext.DrawLine(drawSetting.GraphPen, new Point(i, 0), new Point(i, drawSetting.DrawSize.Height));
                stepCounterHorizontalAxis23 += drawSetting.GrapthStep;
            }

            int stepCounterHorizontalAxis14 = 0;

            for (double i = drawSetting.BasePoint.X; i < drawSetting.DrawSize.Width; i += scaleGraphStep)
            {
                drawingContext.DrawLine(drawSetting.GraphPen, new Point(i, 0), new Point(i, drawSetting.DrawSize.Height));
                stepCounterHorizontalAxis14 += drawSetting.GrapthStep;
            }
        }
Exemple #2
0
        private void DrawHorizontalGridLines(DrawingContext drawingContext, DrawSetting drawSetting)
        {
            double scaleGraphStep = drawSetting.GetScaleGrapthStep();

            double stepCounterVerticalAxis12 = 0;

            for (double i = drawSetting.BasePoint.Y; i > 0; i -= scaleGraphStep)
            {
                drawingContext.DrawLine(drawSetting.GraphPen, new Point(0, i), new Point(drawSetting.DrawSize.Width, i));
                stepCounterVerticalAxis12 += drawSetting.GrapthStep;
            }

            int stepCounterVerticalAxis34 = 0;

            for (double i = drawSetting.BasePoint.Y; i < drawSetting.DrawSize.Height; i += scaleGraphStep)
            {
                drawingContext.DrawLine(drawSetting.GraphPen, new Point(0, i), new Point(drawSetting.DrawSize.Width, i));
                stepCounterVerticalAxis34 -= drawSetting.GrapthStep;
            }
        }