// factor = 0.75 or something static Rectangle centerScreenPart(double factor) { int x = screenWidth(), y = screenHeight(); int w = iround(x*factor), h = iround(y*factor); ret new Rectangle((x-w)/2, (y-h)/2, w, h); }