Thursday, 14 February 2013

How to create a animated 3d names using Turboc++ graphics

Program:


#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<dos.h>
#include<stdlib.h>
#include<iostream.h>
#include<graphics.h>
#include<string.h>

void main ()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\Turboc3\\bgi");
int x,y,h;
for(x=0;x<=100;x++)
{
settextjustify(CENTER_TEXT,CENTER_TEXT);
setcolor(1);
settextstyle(1,0,4);
setusercharsize(x,6,x,3);
setcolor(14);
moveto(310,135);
outtext("..");
setcolor(6);
moveto(310,130);
outtext("I I");
if(x<50)
delay(30);
else
delay(20);
}
for(y=0;y<=100;y++)
{
setcolor(0);
settextstyle(1,0,4);
setusercharsize(y,6,y,3);
moveto(310,135);
outtext("..");
moveto(310,130);
outtext("I I");
if(y>20)
{
settextstyle(7,0,3);
setusercharsize(y-20,35,y-20,30);
setcolor(9);
outtext("ASIF");
setcolor(2);
outtext("___________");
delay(15);
if(y<100)
{
settextstyle(7,0,3);
setusercharsize(y-20,35,y-20,30);
setcolor(0);
outtext("ASIF");
}
}
}
settextstyle(3,0,2);
delay(50);
getch();
}

Output:



Thanks for watching...
Comment it...

No comments:

Post a Comment