I'm trying to accomplish a result shown in the sample image attached when painting to a canvas.
The initial canvas has a background, and I want to paint two sets of objects: first the red objects and then the blue objects, both with some transparency.
When two objects of the same color overlap, they should look as single object.
When two objects of different color overlap, the blue objects should have the intersections clipped.
Can this be done with blendmodes, layers and transparency?
Regards