If you want all connected paths from a start point you want the flood fill algorithm http://en.wikipedia.org/wiki/Flood_fill
Thanks a lot. I'll check this algorithm, looks like it's what I'm looking for.
Sounds like you want a flood fill algorithm that works across diagonals.
Yes, I need it to work in 8 directions.