Пример #1
0
        int MeasureAxisSize(Axis ax)
        {
            double minStep = GetMinTickStep (ax.Dimension);

            TickEnumerator enumSmall = ax.GetTickEnumerator (minStep);
            if (enumSmall == null)
                return 0;

            TickEnumerator enumBig = ax.GetTickEnumerator (minStep * 2);

            if (enumBig == null)
                return MeasureTicksSize (enumSmall, ax.Dimension);
            else
                return MeasureTicksSize (enumBig, ax.Dimension);
        }
Пример #2
0
        void DrawAxis(Gdk.Window win, Gdk.GC gc, Axis ax)
        {
            double minStep = GetMinTickStep (ax.Dimension);

            TickEnumerator enumSmall = ax.GetTickEnumerator (minStep);
            if (enumSmall == null)
                return;

            TickEnumerator enumBig = ax.GetTickEnumerator (minStep * 2);

            if (enumBig == null) {
                DrawTicks (win, gc, enumSmall, ax.Position, ax.Dimension, ax.TickSize, ax.ShowLabels);
            } else {
                DrawTicks (win, gc, enumSmall, ax.Position, ax.Dimension, ax.TickSize / 2, false);
                DrawTicks (win, gc, enumBig, ax.Position, ax.Dimension, ax.TickSize, ax.ShowLabels);
            }
        }