This can be determined mathematically if you know the radius and center of both circles.
Find the two intersection points of the circles with the getClipBounds () rectangle. - The second highest intersection point between the red circle and the rectangle getClipBounds () contains the top y coordinate of the rectangle. -An additional intersection point between the white circle and the rectangle getClipBounds () contains the lower y coordinate of the rectangle. -X borders are already defined by the getClipBounds () rectangle.
You can build your three figures from there.
source share