boolean (Rectangle aRectangle) { int screenX = aRectangle.x + aRectangle.width / 2; int screenY = aRectangle.y + aRectangle.height / 2; Rectangle screen = ScreenUtil.getScreenRectangle(screenX, screenY); return screen.contains(aRectangle); }