public static void PanDown(IPlotControl control) { double PanFraction = 0.1; AxisLimits limits = control.Plot.GetAxisLimits(); double deltaY = limits.Rect.Height * PanFraction; control.Plot.SetAxisLimits(limits.WithPan(0, -deltaY)); control.Refresh(); }
public static void PanRight(IPlotControl control) { double PanFraction = 0.1; AxisLimits limits = control.Plot.GetAxisLimits(); double deltaX = limits.Rect.Width * PanFraction; control.Plot.SetAxisLimits(limits.WithPan(deltaX, 0)); control.Refresh(); }
public void Test_Render_MousePan() { Plot plt = new(); plt.Plottables.Add(new Plottables.DebugPoint(2, 3, Colors.Magenta)); plt.Plottables.Add(new Plottables.DebugPoint(-7, -4, Colors.LightGreen)); AxisLimits limits = plt.GetAxisLimits(); TestTools.SaveImage(plt, subName: "1"); plt.SetAxisLimits(limits.WithPan(2, 3)); TestTools.SaveImage(plt, subName: "2"); }