当前位置: 首页>>代码示例>>C++>>正文


C++ outtextxy函数代码示例

本文整理汇总了C++中outtextxy函数的典型用法代码示例。如果您正苦于以下问题:C++ outtextxy函数的具体用法?C++ outtextxy怎么用?C++ outtextxy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了outtextxy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: rect

void rect(int i)
{
	setbkcolor(0);

       if(300+i<=0)
       keyhit(i+=10);
	else if(350+i>=640)
	keyhit(i-=10);
	else
	{setlinestyle(DASHED_LINE,1,2);
	 rectangle(300+i,429,350+i,436);
	 setlinestyle(SOLID_LINE,1,2);
	 rectangle(310+i,419,340+i,429);
	 rectangle(322+i,409,328+i,419);
	 setcolor(GREEN);
	 line(10,438,630,438);
	 setfillstyle(SOLID_FILL,6);
	 bar(10,440,630,445);floodfill(12,441,6);
	 setcolor(1);
	 settextstyle(11,0,4);
	 outtextxy(80,460,"Designed and Developed by <<::>> Tejendra Singh & Shubham Singh");
	 setcolor(RED);
	 settextstyle(11,0,4);
	 outtextxy(15,20,"Score:");
	 setcolor(WHITE);
	 circle(303+i,432,3);
	 circle(312+i,432,3);
	 circle(324+i,432,3);
	 circle(336+i,432,3);
	 circle(347+i,432,3);
		 setcolor(i+1);
	 outtextxy(10,50,".");  setcolor(i+1);
	 outtextxy(20,100,"."); setcolor(i+2);
	 outtextxy(30,150,"."); setcolor(i+3);
	 outtextxy(50,50,".");  setcolor(i+4);
	 outtextxy(90,200,".");  setcolor(i+5);
	 outtextxy(420,277,"."); setcolor(i+6);
	 outtextxy(150,110,"."); setcolor(i+7);
	 outtextxy(350,300,"."); setcolor(i+8);
	 outtextxy(200,140,"."); setcolor(i+9);
	 outtextxy(550,280,"."); setcolor(i+10);
	 outtextxy(300,250,"."); setcolor(i+11);
	 outtextxy(560,260,"."); setcolor(i+12);
	 outtextxy(400,70,".");  setcolor(i+13);
	 outtextxy(15,239,".");  setcolor(i+14);
	 outtextxy(450,166,"."); setcolor(i+15);
	  outtextxy(300,59,"."); setcolor(i+16);
	 outtextxy(500,80,".");  setcolor(i+17);
	  outtextxy(290,95,"."); setcolor(i+18);
	 outtextxy(530,89,".");  setcolor(i+19);
	   outtextxy(150,305,".");
	 setcolor(RED);
	 }
}
开发者ID:Tej1106083,项目名称:wow,代码行数:54,代码来源:WoW.cpp

示例2: map

void map()
{
	initgraph(900,600);
    setbkcolor(BLACK);
	cleardevice();
	setcolor(YELLOW);
	setfont(70,0,"华文行楷");
	outtextxy(730,10,"说明");
	setcolor(GREEN);
	setfont(25,0,"楷体");
    outtextxy(715,80,"向上按 W或↑");
    outtextxy(715,105,"向下按 S或↓");
    outtextxy(715,130,"向左按 A或←");
    outtextxy(715,155,"向右按 D或→");
    outtextxy(715,180,"暂停按 空格键 ");
	setcolor(LIGHTCYAN);
	setfont(50,0,"华文隶书");
	outtextxy(710,220,"得分:");
	setcolor(LIGHTCYAN);
	setfont(50,0,"华文行楷");
	outtextxy(835,220,"0");
	setcolor(LIGHTGREEN);
	setfont(50,0,"华文行楷");
	outtextxy(710,280,"关次:");
	setcolor(BROWN);
	setfont(50,0,"华文行楷");
	if(cp==1)
	    outtextxy(840,280,"1");
	if(cp==2)
	    outtextxy(840,280,"2");
	if(cp==3)
		outtextxy(840,280,"3");
	setcolor(RED);
	setfont(40,0,"华文行楷");
	outtextxy(705,350,"游戏制作人");
	setcolor(RED);
	setfont(40,0,"华文行楷");
	outtextxy(725,400,"软工1406");
    setcolor(LIGHTGREEN);
	setfont(60,0,"华文行楷");
	outtextxy(710,470,"李鑫焱");
	int i,m,n;
	for(i=1,m=0,n=0;i<=35;i++)
	{
		setfillcolor(BROWN);
		setcolor(RED);
		bar(m,n,m+20,n+20);
        m+=20;
	}
    for(i=1,m=0,n=580;i<=35;i++)
	{
		setfillcolor(BROWN);
		setcolor(RED);
		bar(m,n,m+20,n+20);
        m+=20;
	}
	for(i=1,m=0,n=0;i<=30;i++)
	{
		setfillcolor(BROWN);
		setcolor(RED);
		bar(m,n,m+20,n+20);
        n+=20;
	}
	for(i=1,m=680,n=0;i<=40;i++)
	{
		setfillcolor(BROWN);
		setcolor(RED);
		bar(m,n,m+20,n+20);
        n+=20;
	}
	if(cp==2)
	{
	setcolor(BROWN);
	setfillcolor(BROWN);
	bar(200,160,200+20,160+240);
	bar(420,280,420+20,280+160);
	}
	if(cp==3)
	{
	setcolor(BROWN);
	setfillcolor(BROWN);
	bar(200,160,200+20,160+240);
	bar(420,280,420+20,280+160);
    bar(300,200,300+300,200+20);
	}
}
开发者ID:lxyeinsty,项目名称:SnakeByC,代码行数:86,代码来源:snake.cpp

示例3: main

void main()
{
    if(InitGraphics() == -1)
	return;


    initialisedata();

    clearviewport();
    rectangle(0,0,(maxx+1)*width+2, (maxy+1)*width+2);
    sx = (maxx+1)*width+6;
    sy = (maxy+1)*width+2;

    int loop = 0;
    while(!endgame)
    {
	loop++;
	for (int i = 0; i < NUM_PLAYERS; i++)
	{
	    drawplayer(plist[i]);
	}
	showscoreboard();
	delay(DELAY_INTERVAL);
	for (i = 0; i < NUM_PLAYERS; i++)
	{
	   showbox(plist[i]);
	}
	if (kbhit())
	{
	    handlekeypress();
	}

	if (endgame)
	    break;

	// 1 to n is computer plaer, 0 is me
	for (i = 1; i < NUM_PLAYERS; i++)
	{
	    decidemove(plist[i]);
	}

	for (i = 0; i < NUM_PLAYERS; i++)
	{
	    adjustdir(plist[i]);
	    moveit(plist[i]);
	}
	for (i = 0; i < NUM_PLAYERS; i++)
	{
	      updatescore(plist[i]);
	if (plist[i].score >= WINNING_SCORE)
	{
	    endgame = true;
	    setfillstyle(1, BLUE);

	    bar(200,120,439,300);
	    outtextxy(250,200,"GAME OVER");
	    if (i == 0)
	    {
		outtextxy(250,250,"YOU WIN");
	    }
	    else
	    {
		outtextxy(250,250,"YOU LOSE");
	    }
	    showscoreboard();
            char tr = getch();
        }
	}

    }


}
开发者ID:komalgulati,项目名称:capture,代码行数:73,代码来源:CAPTURE.CPP

示例4: myDraw

void myDraw(void)
{

  setcolor(1.0F,1.0F,1.0F);
  

  switch (bascule)
  {
    /* Trace un rectangle rouge a l'ecran si active
     * par appui de la touche 'a' */
	  
    /*setcolor(1.0F,0.0F,0.0F);
    bar(-0.5F,-0.5F,0.5F,0.5F);*/	  

  case'a':
	  zoom*=1.1;
	break;

  case'r':
	  zoom*=0.9;
	break;

  case't':
	  //Tracer(tab[0]);
	break;

  case'z':
	   DecalageY -= graduation*x*0.1; 
	break;

  case'q':
	   DecalageX += graduation*x*0.1;
	break;

  case's':
	   DecalageY += graduation*x*0.1;
	break;

  case'd':
	   DecalageX -= graduation*x*0.1;
	break;
  }

  if(bascule != 'e')
  {
	  Tracer(tab[0]);
  }

  setcolor(1.0F,1.0F,0.0F);
  outtextxy(-1.0,0.94,"a : Agrandir"); 
  outtextxy(-0.8,0.94,"/   r : Retrecir"); 
  outtextxy(-0.15,0.94,"t : Tracer");
  outtextxy(0.03,0.94,"/   e : Effacer");
  outtextxy(0.5,0.94,"z : Haut");
  outtextxy(-1.0,0.84,"s : Bas"); 
  outtextxy(-0.15,0.84,"q : Gauche");
  outtextxy(0.5,0.84,"d : Droite");  

  char g[10];
  sprintf(g,"%.2f",graduation);
  char aff[23] = "graduation : ";

  strcat(aff, g);

  outtextxy(0.6,-0.9, aff); 

  /*Tracage des axes*/
  
  
  setcolor(1.0F,1.0F,1.0F); // met en couleur la courbe

    double abs = fabs(Ymin)/(Ymax-Ymin);
  abs= -x+abs*x*2;

  line((-1*x)*zoom + DecalageX,(abs)*zoom + DecalageY,(1*x)*zoom + DecalageX,(abs)*zoom + DecalageY);//abscisse

  double ordo = fabs(Xmin)/(Xmax-Xmin);  
  ordo = -x+ordo*x*2;

  line((ordo)*zoom + DecalageX,(-1*x)*zoom + DecalageY,(ordo)*zoom + DecalageX,(1*x)*zoom + DecalageY);//ordonné


  double test1 = (Xmax-Xmin)/graduation;
  double pasX = x*2/test1;

  
  double test2 = (Ymax-Ymin)/graduation;
  double pasY = x*2/test2;

  
  for(float i=0;i<=(x*2);i+=pasX)
  {
	line((-x+i)*zoom + DecalageX,(-0.01+abs)*zoom + DecalageY,(-x+i)*zoom + DecalageX,(0.01+abs)*zoom + DecalageY);//grad abscisse
  }

  for(float i=0;i<=(x*2);i+=pasY)
  {
	line((-0.01+ordo)*zoom + DecalageX,(-x+i)*zoom + DecalageY,(0.01+ordo)*zoom + DecalageX,(-x+i)*zoom + DecalageY);// grad ordonnées
  }
  
//.........这里部分代码省略.........
开发者ID:alexandregrenet,项目名称:promo_FA17,代码行数:101,代码来源:exemple.c

示例5: outtextxy

void game_variables::over()
{	outtextxy(centrex-20, centrey, "GAME OVER!!");
	getch();
	getch();
	menu.options();
}
开发者ID:SachinBhandari,项目名称:MyCodes,代码行数:6,代码来源:SNAKEF~1.CPP

示例6: main

void main()
{
 title();
 int k=1,a=9;
 clrscr();
 cout<<"How many players do you want (2-4) :";
 cin>>n;

 if (n<2||n>4)
  {
	cout<<"Error";
	getch();
	exit(0);
  }

 while(a>=0)
 {
  for(int i=0;i<10;i++)
	mat[a][i]=k++;
  a--;
  for(i=9;i>=0;i--)
	mat[a][i]=k++;
  a--;
 }

 for(k=0;k<n;k++)
 {
  cout<<"Player "<<k+1<<" Enter initial :";
  cin>>pini[k][0];
  pini[k][1]='\0';
 }

 clrscr();
 a=DETECT;
 initgraph(&a,&k,"C:\\TC\\BGI");
 while (victory==0)

  for(int i=0;i<n;i++)
  {
	cleardevice();
	grid();

	for(int j=0;j<n;j++)
	 for(int y=0;y<10;y++)
	  for(int x=0;x<10;x++)
		if (mat[y][x]==player[j])
		 showcounter(x,y,j);

	char g[20];
	settextjustify(0,1);
	settextstyle(2,0,5);
	sprintf(g,"Player %d:Your chance",i+1);
	setcolor(BLACK);
	outtextxy(480,20,g);
	randomize();
	int dice=rand()%6+1;
	while(!kbhit())
	for(int z=1;z<7;z++)
	{
	 diceshow(z);
	 delay(50);
	}
	getch();

	diceshow(dice);
	getch();
	if (player[i]+dice>100) continue;
	player[i]+=dice;

	for(k=1;k<n;k++)
	 for(j=0;j<n;j++)
	  if (player[i]==player[j]&&i!=j)
		player[i]++;

	for(j=0;j<17;j++)
	{
	 if(player[i]==snl[j][0])
	  player[i]=snl[j][1];
	}

	for(k=1;k<n;k++)
	 for(j=0;j<n;j++)
	  if (player[i]==player[j]&&i!=j)
		player[i]++;

	for(j=0;j<17;j++)
	{
	 if(player[i]==snl[j][0])
	  player[i]=snl[j][1];
	}

	if(player[i]==100)
	 {
	  victory=i+1;
	  break;
	 }

  }
 cleardevice();
 setcolor(RED);
//.........这里部分代码省略.........
开发者ID:rahuljain,项目名称:playground_CPlusPlus,代码行数:101,代码来源:PROJECT1.CPP

示例7: main

void main()
{
	int driver=0,mode=VESA_1024x768x8bit,paused=0;
	char *p;
	block bl;
	int key,n=1;
	long t0;
	initgraph(&driver,&mode,"");
	randomize();
	memset(map_check,0,sizeof(map_check));
	draw_map();
	t0=time(NULL);
	init_block(&bl);
	itoa(score,ss,10);
	outtextxy(X0+470,Y0+320,ss);
	outtextxy(X0+397,Y0+220,"Press spacebar to pause");
	outtextxy(X0+397,Y0+270,"Press spacebar agian to continue");
	while(!stop)
	{
		show_block(bl);
		if(check_xy(bl)==3)
		{
			bl.y--;
			init_block(&bl);
			check_gameover();
			show_block(bl);
		}
		while(((long)time(NULL)-t0)<=n*dtime)
		{
			if(bioskey(1)!=0)
			{
				key=bioskey(0);
				clear_block(bl);
				switch(key)
				{
					case UP:bl.rotate++;break;
					case LEFT:bl.x--;break;
					case RIGHT:bl.x++;break;
					case DOWN:bl.y++;break;
					case ESC:stop=1;break;
					case SPACE:show_block(bl);paused=1;break;
					default:break;
				}
				while(paused){
					if(bioskey(1)!=0)
					{
						if(bioskey(0)==SPACE)
						{
							clear_block(bl);
							paused=0;
						    break;
						}
					}
				}
				if(bl.rotate>3 || bl.rotate<0)
					bl.rotate=0;
				if(check_xy(bl)==1)
					bl.x++;
				if(check_xy(bl)==2)
					bl.x--;
				if(check_xy(bl)==3)
				{
					bl.y--;
					check_gameover();
					show_block(bl);
					while(cover())
					{
						delete_last(cover());
						score+=100;
						setfillstyle(SOLID_FILL,BLACK);
						bar(X0+460,Y0+300,X0+520,Y0+340);
						itoa(score,ss,10);
						setcolor(WHITE);
						outtextxy(X0+470,Y0+320,ss);
					}
					init_block(&bl);
					check_gameover();
				}
				if(check_collision(bl))
				{
					if(key==UP)
						bl.rotate--;
					if(key==LEFT)
						bl.x++;
					if(key==RIGHT)
						bl.x--;
					if(key==DOWN)
					{
						bl.y--;
						check_gameover();
						show_block(bl);
						while(cover())
						{
							delete_last(cover());
							score+=100;
							setfillstyle(SOLID_FILL,BLACK);
							bar(X0+460,Y0+300,X0+520,Y0+340);
							itoa(score,ss,10);
							setcolor(WHITE);
							outtextxy(X0+470,Y0+320,ss);
//.........这里部分代码省略.........
开发者ID:yyh1102,项目名称:teris,代码行数:101,代码来源:teris.c

示例8: setfillstyle

void node::changename()
{   int i=0;
    //	setviewport(200,200,400,250,0);
    setfillstyle(SOLID_FILL,9);
    //	bar(200,200,400,252);
    ////////////
    unsigned size;
    void far*q;
    size=imagesize(200,200,400,252);
    q=(void far*)malloc(size);
    getimage(200,200,400,252,q);
    //////////////
    //	putimage(20,20,q,0);
    bar(200,200,400,252);
    char *a="change",*b="next",*c="close";
    rectangle(200,230,260,250);//change button
    outtextxy(205,233,a);
    rectangle(267,230,330,250);//next button
    outtextxy(274,233,b);
    rectangle(334,230,400,250);//close button
    outtextxy(338,233,c);
    //	textbackground(9);
    //	textcolor(6);

    int k=1;
    while(flag==1&&i<=nodenum)
    {
        //gotoxy(28,14);
        //	textbackground(3);
        //textcolor(12);
        //cprintf("dsfr");
        //	if(k==1)
        //	{
        outtextxy(210,210,"to change;click change");
        k++;
        //	}
        getmousepos();
        if(button==1&&x<260&&x>200&&y<250&&y>230)  //change
        {   /*gotoxy(33,14);
            char cc;
            int j=0;
            while((cc=getchar())!='\n')
            {n[i].name[j]=cc;j++;}*/
            bar(200,200,400,229);
            char h[2];
            *h=i+48;
            *(h+1)=':';
            *(h+2)='\0';
            outtextxy(210,210,h);
            char cc;
            int j=0;
            while((cc=getchar())!='\n')
            {
                n[i].name[j]=cc;
                j++;
            }

        }
        if(button==1&&x<330&&x>267&&y<250&&y>230)   //next
        {
            i++;
            /* gotoxy(28,14);
            cprintf(" %d :%s         ",n[i].id,n[i].name);
            continue;*/

        }
        if(button==1&&x<400&&x>334&&y<250&&y>230)    //close
        {
            hidemouseptr();
            putimage(200,200,q,0);
            showmouseptr();
            break;
        }

    }

}
开发者ID:snayaksnayak,项目名称:visual_data_structure,代码行数:77,代码来源:visual_data_structure.cpp

示例9: main

int main()
{
   int gd=DETECT,gm;
   initgraph(&gd,&gm,"");
int c=12;
setbkcolor(0);
//setlinestyle(0,1,2);
int t;
while(1)
{
settextstyle(2,0,5);
outtextxy(100,10,"Press L,H ,T,P");
outtextxy(100,30,"Press 1 for Quit");
as:
setcolor(13);
ellipse(380,127,20,152,130,35);
//////////////////////////////rear//////////////////////////

line(490,109,560,142);
line(560,142,569,142);
line(569,142,582,102);
line(582,102,620,92);
line(593,132,617,125);

line(617,124,627,96);
line(620,92,628,97);

line(472,86,602,96);
line(501,113,575,121);
line(443,77,475,80);

line(443,77,432,93);
line(475,80,472,85);
//setcolor(4);
   line(593,132,593,137);
   line(593,137,600,141);
   line(600,141,600,185);
   line(600,185,608,192);
   line(608,192,608,234);
   line(608,234,586,253);
    line(586,253,577,248);

/////////////////////////           mirror
   line(263,112,363,127);
      line(193,160,263,112);
   line(193,160,220,170);
      line(220,170,280,180);
      line(280,180,320,185);
      line(320,185,363,127);
////////////////////////////////sidemirror
line(340,194,460,169);
 line(460,169,519,152);

ellipse(512,144,300,30,10,10);
ellipse(467,143,28,100,50,30);
line(510,128,521,138);
line(435,116,440,171);

//   setcolor(4);           
////////////////////////////////////////cont//
   line(339,194,372,144);
//    line(372,140,386,128);
ellipse(454,208,87,123,128,95);
line(372,144,384,128);
   int b,x,y;
////////////////////////lower
line(365,298,524,264);
line(365,298,330,310);
line(330,310,323,310);


///////////////////////////////bumper
ellipse(162,221,135,190,90,40);
line(96,193,140,174);
line(140,174,160,168);
line(160,168,192,161);

//////////////////////front
ellipse(75,246,95,190,18,18);
line(57,251,57,286);
//setcolor(4);
ellipse(181,178,232,263,200,137);
ellipse(195,180,256,286,200,137);


ellipse(191,171,228,247,200,100);
ellipse(231,198,234,275,200,80);

//setcolor(9);
//ellipse(195,170,256,286,200,137);
//setcolor(12);

ellipse(196,167,228,246,200,90);
ellipse(231,184,234,276,200,80);


ellipse(191,200,228,246,200,90);
ellipse(228,218,234,276,200,80);

ellipse(258,268,180,220,200,40);
//.........这里部分代码省略.........
开发者ID:saurabhchavan,项目名称:LoadingBar,代码行数:101,代码来源:car.cpp

示例10: graphicize

void graphicize()
{
    clrscr();
    int gd = DETECT, gm, errorcode;
    int rect[8]={0};
    initgraph(&gd, &gm, "c://turboc3/tc/bgi");
    errorcode = graphresult();
    if (errorcode != grOk)
    {
       cout << ":: Graphics error ::";
       cout << "\nCheck the BGI Directory Path for Graphics Files";
       getch();
       exit(1);
    }
    int gmx=getmaxx();
    int gmy=getmaxy();
    setviewport((gmx-600)/2, (gmy-200)/2, ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);
    setbkcolor(3);
    setcolor(1);
    line(0,0,600,0);line(0,30,600,30);line(0,60,600,60);
    line(0,90,600,90);line(0,120,600,120);line(0,150,600,150);
    line(0,180,600,180);
    int r;

    int l;
    for(l=0;l<gsize;l++)
    {
	rect[0]=gtable[l][1];
	rect[1]=(gtable[l][0]-1)*30;
	rect[2]=gtable[l][2];
	rect[3]=(gtable[l][0]-1)*30;
	rect[4]=gtable[l][2];
	rect[5]=gtable[l][0]*30;
	rect[6]=gtable[l][1];
	rect[7]=gtable[l][0]*30;
	setfillstyle(SOLID_FILL,6);
	fillpoly(4,rect);
    }
    setviewport((gmx-600)/2+3, (gmy-200)/2-20, ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);
    outtextxy(0,5,"01");
    outtextxy(20,5,"02");
    outtextxy(40,5,"03");
    outtextxy(60,5,"04");
    outtextxy(80,5,"05");
    outtextxy(100,5,"06");
    outtextxy(120,5,"07");
    outtextxy(140,5,"08");
    outtextxy(160,5,"09");
    outtextxy(180,5,"10");
    outtextxy(200,5,"11");
    outtextxy(220,5,"12");
    outtextxy(240,5,"13");
    outtextxy(260,5,"14");
    outtextxy(280,5,"15");
    outtextxy(300,5,"16");
    outtextxy(320,5,"17");
    outtextxy(340,5,"18");
    outtextxy(360,5,"19");
    outtextxy(380,5,"20");
    outtextxy(400,5,"21");
    outtextxy(420,5,"22");
    outtextxy(440,5,"23");
    outtextxy(460,5,"24");
    outtextxy(480,5,"25");
    outtextxy(500,5,"26");
    outtextxy(520,5,"27");
    outtextxy(540,5,"28");
    outtextxy(560,5,"29");
    outtextxy(580,5,"30");
    setviewport((gmx-600)/2, (gmy-200)/2-20, ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);
    line(0,0,600,0);
    for(r=0;r<31;r++)
    {
	line(20*r,0,20*r,200);
    }

    setviewport((gmx-600)/2, 50 , ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);
    setcolor(4);
    settextstyle(DEFAULT_FONT,HORIZ_DIR,3);
    outtext("GANNT CHART");
    setviewport((gmx-600)/2, 80 , ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);
    setcolor(8);
    settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
    outtext("No. of Processes : ");

    if(n==1) outtext("1");
    if(n==2) outtext("2");
    if(n==3) outtext("3");
    if(n==4) outtext("4");
    if(n==5) outtext("5");
    if(n==6) outtext("6");
    setviewport((gmx-600)/2, 100 , ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);

    outtext("Scheduling Method : ");
    if(choice=='1') outtext("FCFS - First Come First Serve");
    if(choice=='2') outtext("SJF - Shortest Job First");
    if(choice=='3') outtext("SRTF - Shortest Remaining Time First");
    if(choice=='4') outtext("RR - Round Robin");
    setviewport((gmx-600)/2-10, (gmy-200)/2, ((gmx-600)/2)+600, ((gmy-200)/2)+200, 1);
    setcolor(1);
//.........这里部分代码省略.........
开发者ID:shreyas29,项目名称:CPlusPlus,代码行数:101,代码来源:GANTT.CPP

示例11: main


//.........这里部分代码省略.........
            setfillstyle(SOLID_FILL, GREEN);
            fillpoly(7, k3);
            pno(329);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(7, k3);
            pnobody();
            break;
        }
        case 'R': {
            setfillstyle(SOLID_FILL, RED);
            fillpoly(7, k4);
            pno(350);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(7, k4);
            pnobody();
            break;
        }
        case 'T': {
            setfillstyle(SOLID_FILL, GREEN);
            fillpoly(9, k5);
            pno(392);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(9, k5);
            pnobody();
            break;
        }
        case 'Y': {
            setfillstyle(SOLID_FILL, RED);
            fillpoly(9, k6);
            pno(440);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(9, k6);
            pnobody();
            break;
        }
        case 'U': {
            setfillstyle(SOLID_FILL, GREEN);
            fillpoly(7, k7);
            pno(493);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(7, k7);
            pnobody();
            break;
        }
        case 'I': {
            setfillstyle(SOLID_FILL, RED);
            fillpoly(7, k8);
            pno(523);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(7, k8);
            pnobody();
            break;
        }
        case 'O': {
            setfillstyle(SOLID_FILL, GREEN);
            fillpoly(9, k9);
            pno(587);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(9, k9);
            pnobody();
            break;
        }
        case 'P': {
            setfillstyle(SOLID_FILL, RED);
            fillpoly(7, k10);
            pno(659);
            setfillstyle(SOLID_FILL, BLUE);
            fillpoly(7, k10);
            pnobody();
            break;
        }
        case ' ': {
            break;
        }
        }
        c = getch();
    } while (c != ' ');
    setviewport(0, 0, maxx, maxy, 1);
    cleardevice();
    for (j = 0; j <= 1100; j++) {
        putpixel(random(maxx), random(maxy), 4);
        delay(1);
    }
    setcolor(4);
    outtextxy(270, 150, "C R E D I T S");
    for (int i = 0; i <= 3; i++) {
        outtextxy(260, 155 + i, "_______________");
    }
    delay(600);
    outtextxy(150, 200, " #Suvojit Manna:Concept & Design,Core Programing");
    outtextxy(160, 205, "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");
    delay(600);
    outtextxy(165, 250, " #Prangshu Shyam:Graphical Assisstance");
    outtextxy(180, 255, "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");
    delay(600);
    outtextxy(200, 300, " #Sourav Kundu:Final Compilation");
    outtextxy(210, 305, "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");
    getch();
    return 0;
}
开发者ID:shin-migami,项目名称:Piano,代码行数:101,代码来源:Piano+v1.0.CPP

示例12: showmenu

int showmenu()
{
	int gd=DETECT, gm;
	int i,j;
	int k;

	initgraph(&gd,&gm,"c:\\tc\\bgi");

	setbkcolor(YELLOW);
	setcolor(BROWN);

	rectangle(120,85,490,385);
	rectangle(130,95,500,395);

	setcolor(GREEN);
	settextstyle(4,0,4);
	outtextxy(110,35,"_-~ Search for me... ~-_");
	settextstyle(7,0,3);
	setcolor(BROWN);
	outtextxy(180,105,"ENTER YOUR CHOICE:");
	settextstyle(2,0,0);
	setcolor(BROWN);
	outtextxy(230,145,"[1].	Add a word. ->");
	outtextxy(230,170,"[2].	Find meaning. ->");
	outtextxy(230,195,"[3].	Display all. ->");
	outtextxy(230,220,"[4]. Change meaning of a word.->");
	outtextxy(230,245,"[5]. Display History.->");
	outtextxy(230,270,"[6]. Save and Close,->");
	outtextxy(230,295,"Enter choice... ->");
	gotoxy(250,300);
	scanf("%d",&k);

	for(i=0;i<636;i++)
	{
	    if(i==635)
		{
		     for(j=0;j<480;j++)
			  {
			      circle(635,j,4);
			      delay(1);
			  }
		}
	    else
		{
		     circle(i,5,5);
		     delay(1);
		}
	}

	for(i=639;i>(-1);i--)
	     {
		  if(i==0)
		      {
			   for(j=475;j>0;j--)
				{
				    circle(5,j,5);
				    delay(1);
				 }
		       }
		  else
		       {
			   circle(i,475,4);
			   delay(1);
			}
	  }
	restorecrtmode();

	return (k);

}
开发者ID:shivam5992,项目名称:Dynamic_Dictionary,代码行数:70,代码来源:Dictionary.C

示例13: main

void main()
{
 char pass[10],npass[10],c,p[10];
 char *cp;
 struct stack s;
 int i,j,k;
 int gd=DETECT,gm;

 FILE *fpass;

 clrscr();

 fpass=fopen("c:\\password.txt","r");

 //first();

 initgraph(&gd,&gm,"c:\\tc\\bgi");

 rectangle(10,405,430,550);
 rectangle(30,415,480,575);

 setcolor(GREEN);
 settextstyle(4,0,4);
 outtextxy(200,350,"_-~ Search for me... ~-_");
 settextstyle(7,0,3);
 setcolor(BROWN);
 /*
 if(fpass==NULL)
    {
     printf("no password exist...\n\n");
     printf("\n\t\tset a new password\n\n");
     printf("enter password:");
     scanf("%d",pass);

     for(*cp=pass[0];*cp!='\0';cp+1)
      j++;
     printf("%d",j);

     for(k=0;k<4;k++)
      {
       printf("%c",pass[k]);
       push(&s,pass[k]);
      }

     fpass=fopen("c:\\password.txt","w");

     for(k=0;k<4;k++)
      {
       c=pop(&s);
       fprintf(fpass,"%c",c);
      }
      fclose(fpass);
    }

 fpass=fopen("c:\\password.txt","r");

 for(k=0;!feof(fpass);k++)
  {
   fscanf(fpass,"%c",npass[k]);

  }


 fclose(fpass);

 printf("\t Enter password  :");
 scanf("%s",&p);
 */
 if(1)
  {
   //intro();

   prog();

   getch();
  }
 else
   {
    end();
   // exit(1);
   }


}
开发者ID:shivam5992,项目名称:Dynamic_Dictionary,代码行数:84,代码来源:Dictionary.C

示例14: drawboard

void drawboard(int startx, int starty, int blocksize)
{
	//Integers declaration
	int iter,iterx,itery;
	//Constant integers decalaration
	int scale = blocksize  * 15;

	setcolor(BLACK);


	//Draw boxes for ludo board:-
	//~~~~~~~~~~~~~~~~~~~~~~~~~
	{
		int locationfromx, locationfromy,
			 locationtox, locationtoy;
		for (iter = 1; iter <=4; iter++)
		{
			switch(iter)
			{
			case 1:
				// For the upper portion
				locationfromx = 6;
				locationfromy = 0;
				locationtox   = 8;
				locationtoy   = 5;
				break;
			case 2:
				// For the left portion
				locationfromx = 0;
				locationfromy = 6;
				locationtox   = 5;
				locationtoy   = 8;
				break;
			case 3:
				// For the right
				locationfromx = 9;
				locationfromy = 6;
				locationtox   = 14;
				locationtoy   = 8;
				break;
			case 4:
				// For the lower portion
				locationfromx = 6;
				locationfromy = 9;
				locationtox   = 8;
				locationtoy   = 14;
				break;
			}

			for(itery = (blocksize*locationfromy) + starty; itery <= (blocksize * locationtoy) + starty; itery = itery + blocksize)
				for(iterx = (blocksize*locationfromx)+startx; iterx <= (blocksize * locationtox) + startx; iterx = iterx + blocksize)
				{
					rectangle (iterx, itery, iterx + blocksize, itery + blocksize);
				}
		}

		// Draw home in middle
		line(startx + blocksize * 6, starty + blocksize * 6, startx + blocksize * 9, starty + blocksize * 9);
		line(startx + blocksize * 9, starty + blocksize * 6, startx + blocksize * 6, starty + blocksize * 9);
		setfillstyle(SOLID_FILL, BLUE);
		floodfill( startx + blocksize * 6.5, starty + blocksize * 7.5, BLACK);
		setfillstyle(SOLID_FILL, GREEN);
		floodfill( startx + blocksize * 7.5, starty + blocksize * 6.5, BLACK);
		setfillstyle(SOLID_FILL, RED);
		floodfill( startx + blocksize * 8.5, starty + blocksize * 7.5, BLACK);
		setfillstyle(SOLID_FILL, YELLOW);
		floodfill( startx + blocksize * 7.5, starty + blocksize * 8.5, BLACK);
		setcolor(BLACK);
		setfillstyle(SOLID_FILL, WHITE);
		fillellipse(startx + blocksize * 7.5, starty + blocksize * 7.5, blocksize, blocksize);
		settextjustify(CENTER_TEXT, CENTER_TEXT);
		outtextxy(startx + blocksize * 7.5, starty + blocksize * 7.5, "Home");
	} //End draw boxes
	
	//Draw blue player's home area
	setcolor(BLUE);
	setfillstyle(CLOSE_DOT_FILL, BLUE);
	bar(startx, starty, startx + blocksize * 6 - 1, starty + blocksize * 6 - 1);
	setfillstyle(SOLID_FILL, WHITE);
	bar(startx + blocksize * 0.5, starty + blocksize * 0.5, startx + blocksize * 5.5,  starty + blocksize * 5.5);
	setfillstyle(SOLID_FILL, BLUE);
	circle(startx + blocksize     + blocksize / 2 , starty + blocksize     + blocksize / 2 , blocksize / 2 );
	circle(startx + blocksize * 4 + blocksize / 2 , starty + blocksize     + blocksize / 2 , blocksize / 2 );
	circle(startx + blocksize     + blocksize / 2 , starty + blocksize * 4 + blocksize / 2 , blocksize / 2 );
	circle(startx + blocksize * 4 + blocksize / 2 , starty + blocksize * 4 + blocksize / 2 , blocksize / 2 );
	line(startx + blocksize * 2, starty + blocksize * 1.5, startx + blocksize * 2  , starty + blocksize * 4.5);
	line(startx + blocksize * 4, starty + blocksize * 1.5, startx + blocksize * 4  , starty + blocksize * 4.5);
	line(startx + blocksize * 1.5, starty + blocksize * 2, startx + blocksize * 4.5, starty + blocksize * 2);
	line(startx + blocksize * 1.5, starty + blocksize * 4, startx + blocksize * 4.5, starty + blocksize * 4);
	floodfill(startx + blocksize * 2.5, starty + blocksize * 2.5, BLUE);

	//Draw green player's home area
	setcolor(GREEN);
	setfillstyle(CLOSE_DOT_FILL, GREEN);
	bar(startx + blocksize * 9 + 1, starty, startx + blocksize * 15, starty + blocksize * 6 - 1);
	setfillstyle(SOLID_FILL, WHITE);
	bar(startx + blocksize * 9.5, starty + blocksize * 0.5, startx + blocksize * 14.5,  starty + blocksize * 5.5);
	setfillstyle(SOLID_FILL, GREEN);
	circle(startx + blocksize * 10.5, starty + blocksize * 1.5, blocksize / 2 );
	circle(startx + blocksize * 13.5, starty + blocksize * 1.5, blocksize / 2 );
//.........这里部分代码省略.........
开发者ID:sharjeel,项目名称:LudoMaster,代码行数:101,代码来源:BOARD.CPP

示例15: layout

void layout()
{
    floodfill(0,0,WHITE);
    setbkcolor(WHITE);
    setcolor(BLACK);
    settextstyle(0,0,1);
    outtextxy(1,55,"credit");
    setbkcolor(BLACK);
    rectangle(1,55,48,65);
    rectangle(1,6,291,52);
    //off
    setfillstyle(SOLID_FILL,BLACK);
    bar(230,75,280,125);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(237,90,"OFF");
    //del,squreroot
    setfillstyle(SOLID_FILL,BLACK);
    bar(175,75,225,125);
    bar(108,75,156,125);
    bar(56,75,104,125);
    bar(4,75,52,125);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(182,90,"DEL");
    line(125,90,142,90);
    line(125,90,123,107);
    line(123,107,120,102);
    outtextxy(128,91,"x");
    outtextxy(71,91,"%");
    outtextxy(20,91,"x");
    settextstyle(2,0,4);
    outtextxy(30,87,"n");


    //9,8,7
    setfillstyle(SOLID_FILL,BLACK);
    bar(4,138,52,188);
    bar(56,138,104,188);
    bar(108,138,156,188);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(20,153,"7");
    outtextxy(72,153,"8");
    outtextxy(124,153,"9");
    //6,5,4
    setfillstyle(SOLID_FILL,BLACK);
    bar(4,192,52,246);
    bar(56,192,104,246);
    bar(108,192,156,246);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(20,207,"4");
    outtextxy(72,207,"5");
    outtextxy(124,207,"6");
    //3,2,1
    setfillstyle(SOLID_FILL,BLACK);
    bar(4,250,52,300);
    bar(56,250,104,300);
    bar(108,250,156,300);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(20,265,"1");
    outtextxy(72,265,"2");
    outtextxy(124,265,"3");
    //0
    setfillstyle(SOLID_FILL,BLACK);
    bar(4,304,52,354);
    bar(56,304,104,354);
    bar(108,304,156,354);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(25,315,".");
    outtextxy(72,319,"0");
    outtextxy(114,319,"ANS");
    //+,-
    setfillstyle(SOLID_FILL,BLACK);
    bar(175,138,225,246);
    bar(175,250,225,300);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(195,183,"+");
    outtextxy(195,265,"-");
    //c,*,/
    setfillstyle(SOLID_FILL,BLACK);
    bar(229,138,279,188);
    bar(229,192,279,246);
    bar(229,250,279,300);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(245,153,"C");
    outtextxy(245,207,"X");
    outtextxy(250,265,"/");
    //=
    setfillstyle(SOLID_FILL,BLACK);
    bar(200,304,250,354);
    setcolor(RED);
    settextstyle(2,0,6);
    outtextxy(218,319,"=");
}
开发者ID:1604073-Opu,项目名称:Simple-Calculator,代码行数:100,代码来源:main.cpp


注:本文中的outtextxy函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。