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

DrawTicks() защищенный Метод

Draw the ticks.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The drawing surface on which to draw.
physicalMin Point The minimum physical extent of the axis.
physicalMax Point The maximum physical extent of the axis.
labelOffset object out: a suitable offset from the axis to draw the axis label.
boundingBox object out: smallest box that completely encompasses all of the ticks and tick labels.
Результат void
        protected override void DrawTicks(
            Graphics g,
            Point physicalMin,
            Point physicalMax,
            out object labelOffset,
            out object boundingBox)
        {
            // TODO: Look at offset and bounding box logic again here. why temp and other vars? 

            Point tLabelOffset;
            Rectangle tBoundingBox;

            labelOffset = this.getDefaultLabelOffset(physicalMin, physicalMax);
            boundingBox = null;

            List<double> largeTicks;
            List<double> smallTicks;
            this.WorldTickPositions(physicalMin, physicalMax, out largeTicks, out smallTicks);

            // draw small ticks.
            for (int i = 0; i < smallTicks.Count; ++i)
            {
                this.DrawTick(g, (double)smallTicks[i],
                              this.SmallTickSize, "", new Point(0, 0),
                              physicalMin, physicalMax,
                              out tLabelOffset, out tBoundingBox);
                // assume label offset and bounding box unchanged by small tick bounds.
            }

            // draw large ticks.
            for (int i = 0; i < largeTicks.Count; ++i)
            {
                DateTime tickDate = new DateTime((long)((double)largeTicks[i]));
                string label = LargeTickLabel(tickDate);

                this.DrawTick(g, (double)largeTicks[i],
                              this.LargeTickSize, label, new Point(0, 0),
                              physicalMin, physicalMax, out tLabelOffset, out tBoundingBox);

                UpdateOffsetAndBounds(ref labelOffset, ref boundingBox, tLabelOffset, tBoundingBox);
            }
        }