|
|
Description
This applet demonstrates how the interior of a polygon is
filled using a recursive four-connected fill algorithm.
Code
(Recursive Fill Algorithm)
|
void boundaryFill(int x, int y){ if(getPixel(x,y)==0){ setPixel(x,y); boundaryFill(x+1,y); boundaryFill(x-1,y); boundaryFill(x,y+1); boundaryFill(x,y-1); } } |