answersLogoWhite

0


Best Answer

#include

#include

#include

#include

#include

#include

void fill(int x,int y,int c,int bon);

void main()

{

clrscr();

int gdriver=DETECT,gmode;

initgraph(&gdriver,&gmode,"");

setcolor(WHITE);

line(0,316,640,316);

bar(297,170,300,316);

bar(195,170,297,173);

setcolor(8);

circle(190,170,5);

floodfill(190,170,8);

setcolor(WHITE);

bar(184,170,179,173);

bar(177,170,180,176);

bar(189,164,191,160);

bar(186,160,194,158);

line(150,315,210,315);

line(150,315,150,260);

line(210,315,210,260);

line(147,257,210,260);

line(213,257,210,260);

getch();

setcolor(BLUE);

for(int j=178;j<=314;j++)

{

line(179,178,179,j);

line(178,178,178,j);

delay(20);

}

int b=1;

for(int i=314;i>260;i--)

{

setcolor(0);

line(179,314-b,179,314-b);

line(178,314-b,178,314-b);

fill(178,i,1,15);

b++;

}

setcolor(0);

line(179,178,179,260);

line(178,178,178,260);

getch();

closegraph();

}

void fill(int x,int y,int c,int bon)

{

int curr=getpixel(x,y);

if(curr!=c)

{

if(curr!=bon)

{

putpixel(x,y,c);

fill(x+1,y,c,bon);

fill(x-1,y,c,bon);

delay(2);

}

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program of bucket filling in computer graphics lab?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How did the Incas get there water?

They got their water by going down to the river wit a bucket and filling it up


How did Inca get there water?

They got their water by going down to the river wit a bucket and filling it up


What are the functions of VGA port in a computer?

Stands for "Video Graphics Array." It is the standard monitor or display interface used in most PCs.


What do you do to become a gardener?

It can be as easy as using an old bucket, filling it with soil, and planting a tomato plant. Just make sure the bottom of the bucket has drain holes. You will also have to water at least twice per day.


If computer catches fire what to use?

pour a bucket of cold water on it or grab a fire extinguisher and spray it on the computer if it does not work I'm sorry


How do I access other user buckets?

Bucket 1 Bucket 2 Bucket 3 Bucket 4 Bucket 5 Bucket 5 Bucket 7 Bucket 8 Bucket 9 Bucket 10 Bucket 11 Bucket 12 Bucket 13 Bucket 14 Bucket 15 Bucket 16 Bucket 17 Bucket 18 Bucket 19 Bucket 20


What do you do with the bucket on vampire curse island?

go outside and fill it with water from the geyser at the front of the castle, then go back to the plant and now your plant will have water. Filling it with rain does not work.


Where is the icy water on RuneScape?

If you are talking about the 2009 cristmas event then it is obtained by filling a bucket found in the house in the event in the fountain near the tables. It will melt if taken out of the event area.


What was plankton's customer's name on spongebob?

Plankton's computer wife bribes Nat to eat at the chum bucket


What can you do with a piece of rock?

You can put the rock into the bucket, or if the rock is too big you can put the bucket on the rock. You can throw or discard the rock and carry the bucket. You could collect more rocks to put with rock #1 so it won't be "lonely" and carry them all in a bucket.You could use the bucket as a:drum, by beating it's side with the rockwater collection system, by placing the cooler rock into the bucket and collecting dew from the rock.humidity system that won't tip over by placing the rock into the bucket and filling the bucket with water, then placing the bucket on a register vent (duct from a furnace)You could use the rock to:put an engraving on a metal bucket


Advantages of indoor computer game?

Your not boreder than a bucket of 2 week old fried chicken on the 4th of July!


How many militers are in a bucket?

There is no standard size of bucket; the number of millilitres which fit in a given bucket vary from bucket to bucket.