- Boundary fill
In
computer graphics , Boundary fill, or Boundary-fill is an algorithm used to fill an area with a specified color. The algorithm works by filling an area with a specified color until the specified boundary color is encoutered. It is similar to theFlood fill algorithm.The algorithm
The algorithm works by starting in a specified point (x,y), filling that point with the specified fill color if it is not a boundary and recursively continuing with the 4 or eight closest neighbours. The example below uses the 4 closest neighbours.
Other Uses
The Boundary fill algorithm can also be used in games like
SameGame , in which same color adjacent blocks must be destroyed.External links
* [http://www.siggraph.org/education/materials/HyperGraph/scanline/outprims/polygn6a.htm Boundary Fill Algorithm]
* [http://www.mtsu.edu/~dhr2c/FillAlg.html Fill Algorithms]
Wikimedia Foundation. 2010.