I have a canvas-based drawing app that when zoomed in, I draw a miniature of the overall drawing in one corner as a scaled Bitmap. I also have a small RectF that I draw over top of the miniature, which shows you where you are in the drawing. See first attached image.

What I would like to do is to draw the scaled bitmap, then draw a RectF of the same size over top of it, with an alpha value that allows you to see the miniature, and then finally, punch a hole in the RectF that shows you where you are and allows you a clearer view of the miniature. See second attached image.

I’ve considered using a bitmap for the RectF with the hole already ‘built-in’, but as the hole will both be moving depending on location, and will change in size depending on scale factor, I need to do it dynamically.
I’ve looked over the RectF docs but don’t see anything that would allow me to clip the RectF with a smaller RectF that would make the ‘hole’. Any ideas?
You could use a
Pathwith filling option.moveTo0,0 and frame the whole minipic, thenmoveTothe first corner inside and frame/create the hole. Not sure if it works but you can also add shapes to the path.