I use Fabric.js to create a simple drawing application. One of the possibilities I'm having problems with 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 to fill the intersection [C] of two objects [A, B].

Does anyone know how to achieve this? I searched for examples and tutorials on how to implement this, and many point to "Flood Fill," but I don't think it can be implemented using Fabric.js
Any help would be greatly appreciated!
source
share