BOUNDARY-FILL PROGRAM IN C
Similar Programs
- Flood Fill program in C
- Triangle Rotation Program
- Text animation program in C
- C program for fixed point scaling and rotation
- C Program for shearing of triangle, line and rectangle
- C program to plot different types of lines
- Scaling program in C
- Font animation program in C
- Midpoint ellipse drawing program in C
- Circle Midpoint program in C
- Translation program in C
- Bresenhem Circle drawing program in C
- String Generation program in C
- Bresenhem Line drawing program in C
- Plotting a pixel in C
- DDA line drawing program in C
- Boundary fill program in C
- Character Generation program in C
- Triangle Rotation program in C
//***PROGRAM FOR BOUNDARY FILL ALGORITHM***// #include<stdio.h> #include<conio.h> #include<graphics.h> void b_fill(int x,int y,int f,int b) { int c; c=getpixel(x,y); if((c!=b)&&(c!=f)) { putpixel(x,y,f); delay(10); b_fill(x+1,y,f,b); b_fill(x,y+1,f,b); b_fill(x+1,y+1,f,b); b_fill(x-1,y-1,f,b); b_fill(x-1,y,f,b); b_fill(x,y-1,f,b); b_fill(x-1,y+1,f,b); b_fill(x+1,y-1,f,b); } } //void b_fill(int,int,int,int); void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); rectangle(50,50,100,100); b_fill(55,55,4,15); getch(); }
what is 'b' and 'f' in this example?
ReplyDeleteThose are the colours f- fill colour
ReplyDeleteb- boundary colour
ITS USEFUL THANK U.
ReplyDelete