Example #1
0
        private void DrawAxisTests(Context ctx, Rectangle bounds)
        {
            Rectangle boundingBox;
            Point tl = Point.Zero;
            Point br = Point.Zero;;

            tl.X = bounds.Left + 30;	tl.Y = bounds.Top + 20;
            br.X = bounds.Right - 30;	br.Y = bounds.Top + 20;

            DateTime timeMin = new DateTime (2013, 1, 1, 12, 30, 0);
            DateTime timeMax = new DateTime (2013, 2, 2, 12, 30, 0);

            DateTimeAxis dta = new DateTimeAxis (timeMin, timeMax);
            dta.Draw (ctx, tl, br, out boundingBox);

            timeMin = new DateTime (2013, 1, 1, 12, 30, 0);
            timeMax = new DateTime (2013, 1, 1, 12, 59, 30);
            dta.WorldMin = (double)timeMin.Ticks;
            dta.WorldMax = (double)timeMax.Ticks;

            tl.Y += 50;		br.Y += 50;
            dta.Draw (ctx, tl, br, out boundingBox);
        }
Example #2
0
 /// <summary>
 /// Deep copy of DateTimeAxis.
 /// </summary>
 /// <returns>A copy of the DateTimeAxis Class.</returns>
 public override object Clone()
 {
     DateTimeAxis a = new DateTimeAxis ();
     // ensure that this isn't being called on a derived type. If it is, then oh no!
     if (GetType() != a.GetType()) {
         throw new XwPlotException( "Clone not defined in derived type. Help!" );
     }
     DoClone (this, a);
     return a;
 }
Example #3
0
 /// <summary>
 /// Helper method for Clone.
 /// </summary>
 /// <param name="a">The original object to clone.</param>
 /// <param name="b">The cloned object.</param>
 protected static void DoClone(DateTimeAxis b, DateTimeAxis a)
 {
     Axis.DoClone (b, a);
 }
Example #4
0
 /// <summary>
 /// Helper method for Clone.
 /// </summary>
 /// <param name="a">The original object to clone.</param>
 /// <param name="b">The cloned object.</param>
 protected static void DoClone(DateTimeAxis b, DateTimeAxis a)
 {
     Axis.DoClone(b, a);
 }