home *** CD-ROM | disk | FTP | other *** search
- (*-------------------------------------------------------------------------*)
- (* FLOODFIL.PAS *)
- (* Rekursiver Floodfill zum Flaechenfuellen *)
-
- PROCEDURE Fill (x: x_Koord; y: y_Koord; SperrFarbe: Sys_Colors);
-
- BEGIN
- IF NOT GetPixel(x, y, SperrFarbe) THEN
- BEGIN (* KEIN Punkt gesetzt, setzen... *)
- point(x,y);
- (* und in alle vier Richtungen gucken *)
- Fill(Succ(x), y, SperrFarbe);
- Fill(Pred(x), y, SperrFarbe);
- Fill(x, Succ(y), SperrFarbe);
- Fill(x, Pred(y), SperrFarbe)
- END
- END;
-
- (*-------------------------------------------------------------------------*)
- (* Ende FLOODFIL.PAS *)