The example you provided was quite trivial :)
Attached is your example with heavy strokes added.
You can see that simple shape operations can't capture the individual objects.
The shapes need to have their strokes converted to paths, and then a bunch of messy operations have to be done. I tried by hand and stopped after wasting 15 minutes. The process it do-able but I am not sure what the algorithm is.
-Rob A>
Consider the attached file, the top shape consists of two overlapping transparent circles, the bottom shape of three non-overlapping opaque paths. It is possible to create a tool which applies such techniques to drawings of arbitrary complexity. Only areas with transparent gradients (or, obviously, where a bitmap is used) may have to be converted to a bitmap.
The main problem is that someone has to implement it, and it's quite a bit more complicated than a bitmap copy.