Example #1
0
        float GetTiling(MaterialTiling tiling)
        {
            if (tiling.EnableTiling == false || tiling.TileFactor <= 0f)
            {
                return(1f);
            }
            ChartDivisionInfo inf = mAxis.MainDivisions;

            if (mIsSubDivisions)
            {
                inf = mAxis.SubDivisions;
            }
            float length = ChartCommon.GetAutoLength(mParent, mOrientation, inf);

            return(length / tiling.TileFactor);
        }
        /// <summary>
        /// used internally to get the tiling for a chart axis division
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="orientation"></param>
        /// <param name="inf"></param>
        /// <returns></returns>
        float GetTiling(AnyChart parent, ChartOrientation orientation, ChartDivisionInfo inf)
        {
            MaterialTiling tiling = inf.MaterialTiling;

            if (tiling.EnableTiling == false || tiling.TileFactor <= 0f)
            {
                return(1f);
            }
            float length     = Math.Abs(ChartCommon.GetAutoLength(parent, orientation, inf));
            float backLength = ChartCommon.GetAutoLength(parent, orientation);
            float depth      = ChartCommon.GetAutoDepth(parent, orientation, inf);

            if (inf.MarkBackLength.Automatic == false)
            {
                backLength = inf.MarkBackLength.Value;
            }
            if (backLength != 0 && depth > 0)
            {
                length += Math.Abs(backLength) + Math.Abs(depth);
            }
            return(length / tiling.TileFactor);
        }