int glassColor = glassRobot.getPixelColor((int) location.getX(), (int) location.getY());
return convertFromGlassColor(glassColor);
}
public Image getCaptureRegion(Rectangle2D region) {
Pixels glassPixels = glassRobot.getScreenCapture(
(int) region.getMinX(), (int) region.getMinY(),
(int) region.getWidth(), (int) region.getHeight()
);
return convertFromGlassPixels(glassPixels);
}