Write a program to implement boundary–fill algorithm.