/** * show the regions Highlight for the given time in seconds (red frame) if 0 - use the global Settings.SlowMotionDelay * * @param secs time in seconds * @return the region itself */ public Region highlight(float secs) { return highlight(secs, null); }
/** * Toggle the regions Highlight visibility (red frame) * * @return the region itself */ public Region highlight() { // Pass true if overlay is null, false otherwise highlight(overlay == null, null); return this; }
/** * hack to implement the getLastMatch() convenience 0 means same as highlight() < 0 same as highlight(secs) if * available the last match is highlighted * * @param secs seconds * @return this region */ public Region highlight(int secs) { return highlight(secs, null); }
/** * Toggle the regions Highlight visibility (frame of specified color)<br> * allowed color specifications for frame color: <br> * - a color name out of: black, blue, cyan, gray, green, magenta, orange, pink, red, white, yellow (lowercase and * uppercase can be mixed, internally transformed to all uppercase) <br> * - these colornames exactly written: lightGray, LIGHT_GRAY, darkGray and DARK_GRAY <br> * - a hex value like in HTML: #XXXXXX (max 6 hex digits) - an RGB specification as: #rrrgggbbb where rrr, ggg, bbb * are integer values in range 0 - 255 padded with leading zeros if needed (hence exactly 9 digits) * * @param color Color of frame * @return the region itself */ public Region highlight(String color) { // Pass true if overlay is null, false otherwise highlight(overlay == null, color); return this; }
private void runFinder(Finder f, Object target) { if (Debug.shouldHighlight()) { if (this.scr.getW() > w + 20 && this.scr.getH() > h + 20) { highlight(2, "#000255000"); } } if (target instanceof Image) { f.find((Image) target); } else if (target instanceof Pattern) { f.find((Pattern) target); } }
/** * Show highlight in selected color * * @param secs time in seconds * @param color Color of frame (see method highlight(color)) * @return this region */ public Region highlight(int secs, String color) { if (getScreen() == null || isOtherScreen() || isScreenUnion) { Debug.error("highlight: not possible for %s", getScreen()); return this; } if (secs > 0) { return highlight((float) secs, color); } if (lastMatch != null) { if (secs < 0) { return lastMatch.highlight((float) -secs, color); } return lastMatch.highlight(Settings.DefaultHighlightTime, color); } return this; } //</editor-fold>
/** * show the regions Highlight for the given time in seconds (frame of specified color) if 0 - use the global * Settings.SlowMotionDelay * * @param secs time in seconds * @param color Color of frame (see method highlight(color)) * @return the region itself */ public Region highlight(float secs, String color) { if (getScreen() == null || isOtherScreen() || isScreenUnion) { Debug.error("highlight: not possible for %s", getScreen()); return this; } if (secs < 0.1) { return highlight((int) secs, color); } Debug.action("highlight " + toStringShort() + " for " + secs + " secs" + (color != null ? " color: " + color : "")); ScreenHighlighter _overlay = new ScreenHighlighter(getScreen(), color); _overlay.highlight(this, secs); return this; }
if (Debug.shouldHighlight()) { if (this.scr.getW() > w + 10 && this.scr.getH() > h + 10) { highlight(2, "#000255000");