Flood Fill
Flood Fill
h>
#include <conio.h>
#include <dos.h>
// Check if the current pixel is not the boundary and not already filled
if (current_color != boundary_color && current_color != fill_color) {
// Set the pixel to the fill color
putpixel(x, y, fill_color);
int main() {
// Initialize graphics mode
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\Turboc3\\BGI");
return 0;
}