NPlot.DateTimeAxis.WorldTickPositions_SecondPass C# (CSharp) Метод

WorldTickPositions_SecondPass() приватный Метод

Compute the small tick positions for largetick size of one or more years. - inside the domain or the large tick positons, is take the mid-point of pairs of large ticks - outside the large tick range, check if a half tick is inside the world min/max This method works only if there are atleast 2 large ticks, since we don't know if its minutes, hours, month, or yearly divisor.
Added by Rosco Hill
private WorldTickPositions_SecondPass ( Point physicalMin, Point physicalMax, List largeTickPositions, List &smallTickPositions ) : void
physicalMin Point The physical position corresponding to the world minimum of the axis.
physicalMax Point The physical position corresponding to the world maximum of the axis.
largeTickPositions List Read in the large tick positions
smallTickPositions List Fill in the corresponding small tick positions
Результат void
        internal override void WorldTickPositions_SecondPass(
            Point physicalMin,
            Point physicalMax,
            List<double> largeTickPositions,
            ref List<double> smallTickPositions
            )
        {
            if (largeTickPositions.Count < 2 || !(LargeTickLabelType_.Equals(LargeTickLabelType.year)))
            {
                smallTickPositions = new List<double>();
                ;
            }
            else
            {
                smallTickPositions = new List<double>();
                double diff = 0.5 * (((double)largeTickPositions[1]) - ((double)largeTickPositions[0]));
                if (((double)largeTickPositions[0] - diff) > this.WorldMin)
                {
                    smallTickPositions.Add((double)largeTickPositions[0] - diff);
                }
                for (int i = 0; i < largeTickPositions.Count - 1; i++)
                {
                    smallTickPositions.Add(((double)largeTickPositions[i]) + diff);
                }
                if (((double)largeTickPositions[largeTickPositions.Count - 1] + diff) < this.WorldMax)
                {
                    smallTickPositions.Add((double)largeTickPositions[largeTickPositions.Count - 1] + diff);
                }
            }
        }