ScreenRegion screenRegion = new DesktopScreenRegion(screenId);
ScreenRegion innerRegion = Relative.to(screenRegion).shorter(100).narrower(100).getScreenRegion();
// create a canvas to draw visualization on the screen
Canvas c = new ScreenRegionCanvas(screenRegion);
c.addBox(innerRegion);
c.addLabel(innerRegion.getCenter(), "Screen " + screenId).withFontSize(30);
c.addImage(Relative.to(innerRegion).center().above(200).getScreenLocation(), ImageIO.read(Images.Dog));
c.show();
// hover the mouse cursor to each corner of the inner circle
mouse.hover(Relative.to(innerRegion).topLeft().getScreenLocation());
mouse.hover(Relative.to(innerRegion).topRight().getScreenLocation());
mouse.hover(Relative.to(innerRegion).bottomRight().getScreenLocation());
mouse.hover(Relative.to(innerRegion).bottomLeft().getScreenLocation());
// find the dog and click on it
ScreenRegion dog = innerRegion.find(new ImageTarget(Images.Dog));
mouse.click(dog.getCenter());
c.hide();
}
}