Add floodFill that checks both border and minmax