@bupaje: I don't think anything is gained by that. You would be using lots of memory for a mostly empty bitmap and searching for red pixels would probably be slower than searching for path nodes.