class ScreenUnion extends Screen {

  private Rectangle _bounds;

  public ScreenUnion() {
    super(true);
    _bounds = new Rectangle();
    for (int i = 0; i < Screen.getNumberScreens(); i++) {
      _bounds = _bounds.union(Screen.getBounds(i));
    }
    x = _bounds.x;
    y = _bounds.y;
    w = _bounds.width;
    h = _bounds.height;
  }

  public Region getRegion() {
    return Region.virtual(_bounds);
  }

  @Override
  public Rectangle getBounds() {
    return _bounds;
  }

  @Override
  public ScreenImage capture(Rectangle rect) {<FILL_FUNCTION_BODY>}
}

    Debug.log(4, "ScreenUnion: capture: (%d,%d) %dx%d", rect.x, rect.y, rect.width, rect.height);
    Screen s = Screen.getPrimaryScreen();
//    Location tl = new Location(rect.getLocation());
//    for (Screen sx : Screen.screens) {
//      if (sx.contains(tl)) {
//        s = sx;
//        break;
//      }
//    }
    ScreenImage si = s.capture(rect);
    return si;
  
<methods>public void <init>() ,public void <init>(int) ,public void <init>(boolean) ,public transient java.lang.Object action(java.lang.String, java.lang.Object[]) ,public static org.sikuli.support.devices.ScreenUnion all() ,public static org.sikuli.script.Screen as(int) ,public org.sikuli.script.ScreenImage capture() ,public org.sikuli.script.ScreenImage capture(int, int, int, int) ,public org.sikuli.script.ScreenImage capture(java.awt.Rectangle) ,public org.sikuli.script.ScreenImage capture(org.sikuli.script.Region) ,public static void closePrompt() ,public static void closePrompt(org.sikuli.script.Screen) ,public transient org.sikuli.script.ScreenImage cmdCapture(java.lang.Object[]) ,public static void doPrompt(java.lang.String, org.sikuli.util.EventObserver) ,public java.awt.Rectangle getBounds() ,public static java.awt.Rectangle getBounds(int) ,public static org.sikuli.script.Screen getDefaultInstance4py() ,public int getID() ,public java.lang.String getIDString() ,public org.sikuli.script.ScreenImage getLastScreenImageFromScreen() ,public static int getNumberScreens() ,public static int getPrimaryId() ,public static org.sikuli.script.Screen getPrimaryScreen() ,public org.sikuli.support.devices.IRobot getRobot() ,public org.sikuli.script.Screen getScreen() ,public static org.sikuli.script.Screen getScreen(int) ,public boolean hasPrompt() ,public static org.sikuli.script.Screen make4py(ArrayList#RAW) ,public org.sikuli.script.Location newLocation(org.sikuli.script.Location) ,public org.sikuli.script.Location newLocation(int, int) ,public org.sikuli.script.Region newRegion(org.sikuli.script.Location, int, int) ,public org.sikuli.script.Region newRegion(org.sikuli.script.Region) ,public org.sikuli.script.Region newRegion(int, int, int, int) ,public void reset() ,public static void resetMonitors() ,public static void resetMonitorsQuiet() ,public static void resetPrompt(org.sikuli.util.OverlayCapturePrompt) ,public static void resetScreens() ,public org.sikuli.script.Region selectRegion() ,public org.sikuli.script.Region selectRegion(java.lang.String) ,public void setAsScreen() ,public void setAsScreenUnion() ,public org.sikuli.script.Region setOther(org.sikuli.script.Region) ,public org.sikuli.script.Location setOther(org.sikuli.script.Location) ,public void setup(int) ,public static void showMonitors() ,public void update(org.sikuli.util.EventSubject) ,public org.sikuli.script.ScreenImage userCapture() ,public org.sikuli.script.ScreenImage userCapture(java.lang.String) ,public void waitAfterAction() <variables>private static org.sikuli.util.EventObserver captureObserver,java.awt.image.BufferedImage capturedImage,java.awt.Rectangle capturedRectangle,protected int curID,private static org.sikuli.support.devices.IRobot globalRobot,public static boolean ignorePrimaryAtCapture,private static boolean isActiveCapturePrompt,private long lastCaptureTime,public org.sikuli.script.ScreenImage lastScreenImage,protected static final java.lang.String logName,static int mainMonitor,static int nMonitors,protected int oldID,private static int primaryScreen,protected org.sikuli.util.OverlayCapturePrompt prompt,private static final java.lang.String promptMsg,java.awt.image.BufferedImage screenShot,private static org.sikuli.script.Screen[] screens,java.util.concurrent.atomic.AtomicBoolean userCaptureActive,private static int waitForScreenshot,protected boolean waitPrompt