Flood Fill Algorithm
Flood Fill Algorithm
}
} X-1, y-1 x,y-1 x+1, y-1
Flood Fill Algorithm
Basic concept:
It is used in case where there is no single color boundary for polygon, i.e the boundary has
multiple colors.
In flood fill algorithm, instead of filling color till you encountered/reached a specific boundary
color, you just fill the pixel with default color.
It is used in the “bucket” fill tool of paint programs to fill connected, similarly-
colored areas with a different color.