Пример #1
0
        public void CookBitmaps()
        {
            // Cook axises' elements and help data
            List <ChartLine> AxisesWithDashes = CookAxisLines(Options, out float xAxisLocation, out float yAxisLocation);
            int        step    = DetectStep(Options);   // dashes and grid lines step in pixels
            List <int> dashesX = CookDashList(Options.MinX, Options.MaxX, step);
            List <int> dashesY = CookDashList(Options.MinY, Options.MaxY, step);
            Offsets    offsets = Offsets.Cook(Options, xAxisLocation, yAxisLocation);

            AxisesWithDashes.AddRange(CookDashLines(Options, offsets, xAxisLocation, yAxisLocation, dashesX, dashesY));
            List <ChartString> DashesSigns = CookDashSigns(Options, offsets, dashesX, dashesY);
            // Cook grid lines
            List <ChartLine> GridLines = CookGridLines(Options, dashesX, dashesY);

            // Draw grid
            Grid = DrawGrid(GridLines, Options);
            // Draw axis on clean bitmap
            Axis = new Bitmap(Options.SizeX + 1, Options.SizeY + 1);
            DrawAxis(Axis, AxisesWithDashes, DashesSigns);
            // Draw axis on Grid bitmap (over grid)
            AxisAndGrid = new Bitmap(Grid);
            DrawAxis(AxisAndGrid, AxisesWithDashes, DashesSigns, false);
        }