Пример #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);
            }
        }
Пример #3
0
 public void AddAxis(Axis ax, AxisPosition position)
 {
     ax.Owner = this;
     ax.Position = position;
     axis.Add (ax);
     QueueDraw ();
 }
Пример #4
0
		void DrawAxis (Context ctx, Axis ax)
		{
			ctx.SetLineWidth (1);
			double minStep = GetMinTickStep (ax.Dimension);
			
			TickEnumerator enumSmall = ax.GetTickEnumerator (minStep);
			if (enumSmall == null)
				return;
				
			TickEnumerator enumBig = ax.GetTickEnumerator (minStep * 2);
			
			if (enumBig == null) {
				DrawTicks (ctx, enumSmall, ax.Position, ax.Dimension, ax.TickSize, ax.ShowLabels);
			} else {
				DrawTicks (ctx, enumSmall, ax.Position, ax.Dimension, ax.TickSize / 2, false);
				DrawTicks (ctx, enumBig, ax.Position, ax.Dimension, ax.TickSize, ax.ShowLabels);
			}
		}
Пример #5
0
		public void AddAxis (Axis ax, AxisPosition position)
		{
			widget.AddAxis (ax, position);
		}
Пример #6
0
 public void AddAxis(Axis ax, AxisPosition position)
 {
     widget.AddAxis(ax, position);
 }