Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 public void AddAxis(Axis ax, AxisPosition position)
 {
     ax.Owner = this;
     ax.Position = position;
     axis.Add (ax);
     QueueDraw ();
 }