Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Name : Jay Gaikwad

Roll no. : 62

PRACTICAL NO. 6

Q.1. Write a program to Boundary Fill Algorithm

INPUT :

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

void main()

int gd,gm;

detectgraph(&gd,&gm);

initgraph(&gd,&gm,"C:\\TURBOC3\\BGI");

rectangle(50,50,100,100);

boundary(55,55,15,4);

getch();

closegraph();

boundary(x,y,foreground_col,background_col)

putpixel(x,y,foreground_col);

boundary(x+1,y,foreground_col,background_col);

boundary(x-1,y,foreground_col,background_col);

boundary(x,y+1,foreground_col,background_col);

boundary(x,y-1,foreground_col,background_col);

boundary(x+1,y+1,foreground_col,background_col);
boundary(x-1,y-1,foreground_col,background_col);

boundary(x+1,y-1,foreground_col,background_col);

boundary(x-1,y+1,foreground_col,background_col);

return 0;

};

OUTPUT :

You might also like