0

Been trying to accomplish a paint like app to bucket fill any closed path, either it be two or more different items intersecting each other or a self intersecting one.

What is currently working is filling an item which intersects the first mouse down point and last mouse move point with closed = true property which is pretty much direct to the point by just setting the fillColor = color.

There are some boolean math operations to get the intersections but I am pretty much stuck with it as there's very little to none examples/resources around.

kamp
  • 375
  • 3
  • 13
  • 1
    Have you seen [this example](http://paperjs.org/examples/boolean-operations/)? [This one](http://paperjs.org/examples/path-intersections/) could help... But flood fill works on rasters, you could convert your shapes into a raster and then flood fill with pixels. – arthur.sw Aug 09 '17 at 18:13
  • @arthur.sw yep saw the examples. Good point there about raster. Just yesterday I'm trying to convert the shape into a raster so the pixels could be manipulated which works good. Now trying to do some flood-fill algo to set the colors. Will update if I get successful with the raster. – kamp Aug 10 '17 at 01:25

0 Answers0