/** * creates a location on the current screen with the given point. The coordinate is translated to * the current screen from its relative position on the screen it would have been created * normally. * * @param loc Location * @return the new location */ public Location newLocation(Location loc) { return (new Location(loc)).copyTo(this); }
/** * new point with same offset to current screen's top left on given screen * * @param scrID number of screen * @return new location */ public Location copyTo(int scrID) { return copyTo(Screen.getScreen(scrID)); }
/** * creates a region on the current screen with the given coordinate/size. The coordinate is * translated to the current screen from its relative position on the screen it would have been * created normally. * * @param loc Location * @param width value * @param height value * @return the new region */ public Region newRegion(Location loc, int width, int height) { return Region.create(loc.copyTo(this), width, height); }