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

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

Given Graphics surface, and physical extents of axis, draw ticks and associated labels.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The GDI+ Graphics surface on which to draw.
physicalMin Point The physical location of the world min point
physicalMax Point The physical location of the world max point
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)
        {
            Point tLabelOffset;
            Rectangle tBoundingBox;

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

            int start = (int)Math.Ceiling( this.WorldMin / Math.PI );
            int end = (int)Math.Floor( this.WorldMax / Math.PI );

            // sanity checking.
            if ( end - start < 0 || end - start > 30 )
            {
                return;
            }

            for (int i=start; i<=end; ++i)
            {
                string label = i.ToString() + "Pi";

                if (i == 0)
                    label = "0";
                else if (i == 1)
                    label = "Pi";

                this.DrawTick( g, i*Math.PI, this.LargeTickSize,
                    label,
                    new Point(0,0),
                    physicalMin, physicalMax,
                    out tLabelOffset, out tBoundingBox );

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