hi,
i have a boundaryFill() function and I want it to paint pixel by pixel
the area limited x and y
x is limited 10 to 100
y is limited 10 to 100
and I call function boundaryFill(50,50);
what is wrong with this code it locks my computer.
thanks very much for your answersCode:void boundaryFill(int x, int y) { if ((x < 10) || (x >= 100)) return; if ((y < 10) || (y >= 100)) return; Form1->Canvas->Pixels[x][y]=clRed; boundaryFill(x+1,y); boundaryFill(x,y+1); boundaryFill(x-1,y); boundaryFill(x,y-1); }