For example, the flood fill algorithm is implemented within the FloodFillPath constructor, and FloodFillPath inherits from Path.
The algorithm should be its own entity that adds to a Path from the outside, rather than being in the constructor of a Path.