#include #include #include #include #include #include int gd,gm,i,j,x; char *s; float r; void *p; void scrie(); void anim(); float rad(float u) { return M_PI*u/180; } void main() { clrscr(); printf("Text"); gets(s); detectgraph(&gd,&gm); initgraph(&gd,&gm,"C:\\BORLANDC\\BGI"); cleardevice(); for (i=1;i<=4;i++) circle(20,20,5*i-1); p=malloc(imagesize(0,0,40,40)); getimage(0,0,40,40,p); cleardevice(); scrie(); // anim(); getch(); // closegraph(); } void scrie() { int mx,dx,my,dy; settextstyle(SMALL_FONT, HORIZ_DIR,0); my=ceil(getmaxy()/textheight(s)*4); setusercharsize(10,10,my,10); mx=ceil(getmaxx()/textwidth(s)*4); setusercharsize(mx,10,my,10); settextjustify(1,1); outtextxy(getmaxx()/2,0,s); outtextxy(getmaxx()/2,getmaxy()/2,s); } void anim() { int pus; j=0;i=1;x=0; pus=AND_PUT; do { i*=-1;x+=3*i; while ((x>=0)&&(x<=getmaxx()-21)) { putimage(x,j,p,pus); delay(10); putimage(x,j,p,pus); putimage(x,j,p,XOR_PUT); delay(10); putimage(x,j,p,XOR_PUT); x+=3*i; } j+=40; if (j>getmaxy()/2) pus=XOR_PUT; } while (j<=getmaxy()-20); }