/** * like {@link Pattern#targetOffset(int, int) Pattern.targetOffset} * sets the click target relative to the center * @param x x offset * @param y y offset */ public void setTargetOffset(int x, int y) { setTargetOffset(new Location(x,y)); }
/** * * @return the next match or null */ @Override public Match next() { Match match = null; if (hasNext()) { FindResult fr = _results.get(_cur_result_i++); IScreen parentScreen = null; if (screenFinder && _region != null) { parentScreen = _region.getScreen(); } match = new Match(fr, parentScreen); match.setOnScreen(screenFinder); fr.delete(); if (_region != null) { match = _region.toGlobalCoord(match); } if (_pattern != null) { Location offset = _pattern.getTargetOffset(); match.setTargetOffset(offset); } match.setImage(_image); } return match; } }