when I touch one place,Within the Prescribed area fill the green color.like this:
and this:
click one of the fish,the both fish are red
Now I can only use the scan line seed filling algorithm to identify a closed area, but cannot identify multiple areas。
Like this coral, one click fills in multiple areas
if any one gives solution it would be so great,Thank you. (English is not my native language; please excuse typing errors.)
I have a crude idea.
floodFill(from: B)
continuebut I don't konw how to implementation if you find that the stack contains seed point A
in this demo
I have solved the problem, this is a Demo
This solution requires fixing two seed points on the leaves。 When a seed point is triggered for coloring, The other one is also coloring.
If there's a better solution, let me know please.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With