Floodfill - gap closing demo

Hi,

First thing to note here is that the full algorithm (C++ and Python) is somewhat tied to the tile-based canvas concept that MyPaint uses, but that can be adapted. The short answer to your question is that if you only want to support moderate canvas sizes (say 2000x2000 pixels), well written Java should be good enough. I would not recommend trying to implement it in pure Python, because even with numpy I think you’d run into performance bottlenecks with the array searches/manipulations.

You should also look into the GMIC auto-fill implementation and GIMP’s adaptation of that algorithm. It might be more suitable for lower-hz cpu’s with multiple cores (which Android cpu’s tend to be).