Example #1
0
        private void SetSpace( Axis axis, float clientSize, ref float spaceNorm, ref float spaceAlt )
        {
            //spaceNorm = 0;
            //spaceAlt = 0;

            float crossFrac = axis.CalcCrossFraction( this );
            float crossPix = crossFrac * ( 1 + crossFrac ) * ( 1 + crossFrac * crossFrac ) * clientSize;

            if ( !axis.IsPrimary( this ) && axis.IsCrossShifted( this ) )
                axis._tmpSpace = 0;

            if ( axis._tmpSpace < crossPix )
                axis._tmpSpace = 0;
            else if ( crossPix > 0 )
                axis._tmpSpace -= crossPix;

            if ( axis._scale._isLabelsInside && ( axis.IsPrimary( this ) || ( crossFrac != 0.0 && crossFrac != 1.0 ) ) )
                spaceAlt = axis._tmpSpace;
            else
                spaceNorm = axis._tmpSpace;
        }