/** * positive offset goes to the right. might be off current screen * * @param offset pixels * @return point with given offset horizontally to middle point on right edge */ public Location rightAt(int offset) { return checkAndSetRemote(new Location(x + w + offset, y + h / 2)); }
/** * @return bottom left corner Location */ public Location getBottomLeft() { return checkAndSetRemote(new Location(x, y + h - 1)); }
/** * @return bottom right corner Location */ public Location getBottomRight() { return checkAndSetRemote(new Location(x + w - 1, y + h - 1)); }
/** * negative offset goes towards top of screen <br>might be off current screen * * @param offset pixels * @return point with given offset vertically to middle point on top edge */ public Location aboveAt(int offset) { return checkAndSetRemote(new Location(x + w / 2, y + offset)); }
/** * @return top left corner Location */ public Location getTopLeft() { return checkAndSetRemote(new Location(x, y)); }
/** * @return top right corner Location */ public Location getTopRight() { return checkAndSetRemote(new Location(x + w - 1, y)); }
/** * negative offset goes to the left <br>might be off current screen * * @param offset pixels * @return point with given offset horizontally to middle point on left edge */ public Location leftAt(int offset) { return checkAndSetRemote(new Location(x + offset, y + h / 2)); }
/** * positive offset goes towards bottom of screen <br>might be off current screen * * @param offset pixels * @return point with given offset vertically to middle point on bottom edge */ public Location belowAt(int offset) { return checkAndSetRemote(new Location(x + w / 2, y + h - offset)); }
/** * @return the center pixel location of the region */ public Location getCenter() { return checkAndSetRemote(new Location(getX() + getW() / 2, getY() + getH() / 2)); }