I have a mapview that I want to draw a circle on to focus on a given area. But i want the circle to be inverted. That is, instead of the inside of the circle being filled, it is transparent and everything else is filled. See this picture for what i mean (http://i.imgur.com/zxIMZ.png). The top half shows what i could do with a normal circle. Bottom shows the "inverted" circle.
I've tried to search, but it's been kind of hard to find what i want. Does anyone know how i could go about doing something like this?
My answer is pretty late, but may help someone to achieve this. Here is an example how to make semitransparent view with transparent circle matching size of the smallest dimension, placed in center with small margin. It can be placed as overlay upon any view.
And here how it looks in my case:
Do as you would do to draw a normal circle but with complement location and complement radius.
Like {0-Lat, (180-Long)%180, 20037508.34-Radius}
You can create a new BufferedImage, fill it grey then erase the circle where you want.
And then, draw that BufferedImage on top of your view.