I am creating a Paint application with C#, WPF, and Visual Studio 4. Just like MS Paint, the user can draw lines and shapes.
How do I fill a user drawn irregular shape with color? Is there a library for doing something like this? Detecting a closed loop that is created by lines seem like an impractical approach. I can imagine all kinds of “leaks” because of one pixel gap.
Thanks.
Flood Fill Algoritms look like the way to go –
http://en.wikipedia.org/wiki/Flood_fill