/** * create a ScreenImage with given coordinates on this screen. * * @param x x-coordinate of the region to be captured * @param y y-coordinate of the region to be captured * @param w width of the region to be captured * @param h height of the region to be captured * @return the image of the region */ @Override public ScreenImage capture(int x, int y, int w, int h) { Rectangle rect = newRegion(new Location(x, y), w, h).getRect(); return capture(rect); }