In android canvas, I’ve defined a clipping area with many shapes (a rectangle and 2 circles). I want to get the inscribed rectangle defined by the clipping area.
Canvas has a method called getClipBounds() which gives me the circumscribed rectangle, how do I get the inscribed rectangle instead?

Edit: Here’s some info on how the original shape is made:
- First add a clip for the big circle with
Region.Op.INTERSECT - Then add a clip for a vertical rectangle with
Region.Op.INTERSECT - Then add a clip for a smaller circle with
Region.Op.DIFFERENCE
This can be determined mathematically if you know the radius & center of both circles.
Find two the intersection points of circles with the getClipBounds() rectangle.
-The the second highest intersection point between the red circle and the getClipBounds() rectangle holds the upper y coordinate of the rectangle.
-The high intersection point between the white circle and the getClipBounds() rectangle holds the lower y coordinate of the rectangle.
-The x bounds are already given by the getClipBounds() rectangle.
You can construct your three shapes from there.