/** * Helper for {@link #setWorldByNumPixels(Rectangle2D, int, int)} and * {@link #setWorldByResolution(Rectangle2D, double, double)} methods. * * @param bounds world bounds * @param xres pixel width * @param yres pixel height */ private void doSetWorld(Rectangle2D bounds, double xres, double yres) { checkResValue(xres, Dim.XDIM, bounds); checkResValue(yres, Dim.YDIM, bounds); _worldBounds = new Rectangle2D.Double( bounds.getMinX(), bounds.getMinY(), bounds.getWidth(), bounds.getHeight()); _xres = xres; _yres = yres; _worldSet = true; }
/** * Helper for {@link #setWorldByNumPixels(Rectangle2D, int, int)} and * {@link #setWorldByResolution(Rectangle2D, double, double)} methods. * * @param bounds world bounds * @param xres pixel width * @param yres pixel height */ private void doSetWorld(Rectangle2D bounds, double xres, double yres) { checkResValue(xres, Dim.XDIM, bounds); checkResValue(yres, Dim.YDIM, bounds); _worldBounds = new Rectangle2D.Double( bounds.getMinX(), bounds.getMinY(), bounds.getWidth(), bounds.getHeight()); _xres = xres; _yres = yres; _worldSet = true; }