RECTANGLE ANIMATION PROGRAM IN C
RECTANGLE ANIMATION 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 rectangle animation//
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int i,c=1,x,y,gd=DETECT,gm;
initgraph(&gd,&gm,"c:\tc\bgi");
setcolor(GREEN);
setwritemode(1);
rectangle(250,200,350,300);
do
{
c %= 51;
setcolor(RED);
rectangle(250+c,200+c,350-c,300-c);
delay(50);
c +=1;
}while(!kbhit());
getch();
closegraph();
}