#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<process.h>
void boundaryfill4(int x,int y,int fill,int boundary)
{
int c;
c=getpixel(x,y);
if((c!=boundary)&&(c!=fill))
{
putpixel(x,y,fill);
boundaryfill4(x+1,y,fill,boundary);
boundaryfill4(x-1,y,fill,boundary);
boundaryfill4(x,y+1,fill,boundary);
boundaryfill4(x,y-1,fill,boundary);
}
}
void main()
{
int driver=DETECT,gmode;
initgraph(&driver,&gmode,””);
setcolor(4);
circle(100,100,30);
rectangle(200,200,240,240);
boundaryfill4(100,100,5,4);
getch();
closegraph();
}
Latest posts by Mohit Arora (see all)
- MongoDB Operators Tutorial – What are Different Operators Available? - October 5, 2019
- MongoDB Projection Tutorial : Return Specific Fields From Query - March 9, 2019
- MongoDB Index Tutorial – Create Index & MongoDB Index Types - July 6, 2018