package nxm.sys.test;

import nxm.sys.inc.InternalUseOnly;
import nxm.sys.libg.MPlot;

/** Test helper for the test macro test_plot_layerdrawable_continuous
 *  Used to zoom in to the correct bounds to test for graphical anomolies.
 *  @author Kevin E.
 *  @since 3.9.2
 */
@InternalUseOnly
public class TestLayerDrawable {

  private TestLayerDrawable () {}

  /** Return a default box as an array of doubles
   *  @return a default box as an array of doubles
   */
  public static double[] getBox () {
    return new double[] { -189.21112762476412, 330.9082114571645, -85.26666259765625, 83.54999542236328 };
  }

  /** Setup and pan plot to be used for testing
   *  @param plot the target plot
   */
  public static void panTest (nxm.sys.prim.plot plot) {
    plot.MP.setView(MPlot.V_LATLON);
    plot.MP.setView(MPlot.V_LATLONCONTINUOUS);
    plot.MP.orx1 = -110.49313288848413;
    plot.MP.orx2 = 249.50686711151587;
    plot.MP.panxy(getBox(), 0);
  }
}