Java anti fillRect (fill everything outside of said rectangle)
In Java, there is the Graphics2D.fillRect(x, y, width, height) function. In my program, I am looking for something similar, yet completely opposite. I need to fill everything on the screen except this certain x, y, width, height, sort of like an anti-fillRect. Is there a built in function that I am overlooking, or can you point me in the right direction to create one? Not required, but it would be a nice bonus if it could work with other Java 2D shapes. There are a few ways that might be achieved, the easiest might be to use java.awt.geom.Area which is a highly versatile Shape implementation,