I'm using Fabric.js to create a simple paint app. One of the features that I'm having problems implementing is the Bucket Tool.
Objects can be filled with color using Fabric.js with canvas.item(0).fill = "red"
However I want to be able fill the intersection[C] of two objects[A,B].
Does anybody knows how to achieve this? I've been looking for examples and tutorials about how to implement this and many point to the 'Flood Fill' but I dont think it can be implemented with Fabric.js
Any help would be kindly appreciated!