本文整理汇总了C++中setfillstyle函数的典型用法代码示例。如果您正苦于以下问题:C++ setfillstyle函数的具体用法?C++ setfillstyle怎么用?C++ setfillstyle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setfillstyle函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: inimigo
void inimigo(int x, int y)
{
setcolor(LIGHTRED);
setfillstyle(1,LIGHTRED);
rectangle(x-7,y-2,x+7,y);
line(x-2,y+1,x,y+10);
line(x+2,y+1,x,y+10);
line(x-2,y-2,x-3,y-5);
line(x+2,y-2,x+3,y-5);
floodfill(x,y-1,LIGHTRED);
floodfill(x,y+5,LIGHTRED);
}
开发者ID:WiLLStenico,项目名称:TestesEOutrasBrincadeiras,代码行数:12,代码来源:GALAC.CPP
示例2: enemy_car1
void enemy_car1(int x1, int y1)
{
p=-400;
while(p<=480)
{
setcolor(13);
setfillstyle(9,13);
rectangle(480,p+y1,490,p+50+y1);
floodfill(482,p+48+y1,13);
p+=100;
}
p=-400;
while(p<=480)
{
setcolor(9);
setfillstyle(9,9);
rectangle(100,p+y1,110,p+50+y1);
floodfill(102,p+y1+48,9);
p+=100;
}
}
开发者ID:shivambca,项目名称:Highway-Riders-Car-Race,代码行数:21,代码来源:CARRACE.CPP
示例3: run_info
void run_info(int pr, int crct, int w, int crtn){
/* pr= pressed, crct= correct, w= wrong , crtn= correction */
setfillstyle(1,15);
bar(582,130,609,200);
show_number(pr,584,130,4,0,1);
show_number(crct,584,150,4,0,1);
show_number(w,584,170,4,0,1);
show_number(crtn,584,190,4,0,1);
}
开发者ID:fnazmul,项目名称:Easy_Typing_Tutor,代码行数:12,代码来源:BGAD_LEV.CPP
示例4: main
main()
{
igraph();
maxx = getmaxx();
maxy = getmaxy();
setcolor(2);
bezier(0.85,0.75,0.57,0.78,0.534,0.9,4);
setfillstyle(2,2);
getch();
closegraph();
return(0);
}
开发者ID:user501254,项目名称:SEM5_IT_CGVR,代码行数:12,代码来源:BezierCurve.c
示例5: snake
void snake(int x1,int y1,int x2,int y2)
{
setlinestyle(3,0,3);
setcolor(GREEN);
line(x1,y1,x2,y2);
//setcolor(8);
setfillstyle(1,GREEN);
fillellipse(x1,y1,4,4);
for(int i=-2;i<3;i++)
for(int j=-2;j<3;j++)
putpixel(x2+i,y2+j,GREEN);
}
开发者ID:rahuljain,项目名称:playground_CPlusPlus,代码行数:12,代码来源:PROJECT1.CPP
示例6: drawgrid
void drawgrid()
{
if(selectedwindow()==3)
{
hidemouse();
//setcolor(15);
int x1,x2,y1,y2;
for(int loopx=0;loopx<maxx;loopx++)
{
for(int loopy=0;loopy<maxy;loopy++)
{
x1=windows[3].x1+4+(loopx*size);
x2=x1+size-1;
y1=windows[3].y1+17+(loopy*size);
y2=y1+size-1;
if(graph[loopx][loopy]==16)
{
setfillstyle(1,7);
bar(x1,y1,x2,y2);
setcolor(8);
line(x1,y1,x2,y2);
line(x1,y2,x2,y1);
}
else
{
setfillstyle(1,graph[loopx][loopy]);
bar(x1,y1,x2,y2);
}
setcolor(0);
rectangle(x1,y1,x2+1,y2+1);
}
}
thumb();
showmouse();
}
}
开发者ID:choptastic,项目名称:OldCode-Public,代码行数:40,代码来源:EDITOR.CPP
示例7: FuelProducer
void FuelProducer()
{
HANDLE chan;
LongMsg m;
unsigned long foo;
chan = CreateNamedPipe("\\\\.\\pipe\\lab2p", PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, 1, sizeof(m), 4, 0, 0);
ConnectNamedPipe(chan, 0);
randomize();
int valStep = 20;
int valBotXCoord = 200;
while (1) {
int volumeVal = random(9) + 1;
int delayVal = volumeVal * 50;
int valTopXCoord = (valBotXCoord - valStep * volumeVal);
for (int i = valBotXCoord; i >= valTopXCoord; i -= valStep) {
setfillstyle(1, ck);
bar(20, i, 60, i + 19);
delay(delayVal);
}
m.cmd = FUEL_READY;
TransactNamedPipe(chan, &m, sizeof(m), &foo, 4, &foo, 0);
for (int i = valTopXCoord; i <= valBotXCoord; i += valStep) {
setfillstyle(1, cw);
bar(20, i, 60, i + 19);
delay(150);
}
m.volume = volumeVal;
m.cmd = FUEL_UPLOADED;
TransactNamedPipe(chan, &m, sizeof(m), &foo, 4, &foo, 0);
}
}
开发者ID:d1v0id,项目名称:UniversityProjects,代码行数:40,代码来源:lab2p1.cpp
示例8: main
int main()
{
initwindow(1275,700);
setfillstyle(1,1);
floodfill(100,100,1);
setcolor(12);
setbkcolor(1);
settextstyle(0,0,8);
outtextxy(330,160,"WELCOME TO ");
outtextxy(140,270,"THE V-PLAY STORE");
setcolor(7);
rectangle(140,450,440,550);
rectangle(840,450,1140,550);
setfillstyle(1,7);
floodfill(300,500,7);
setfillstyle(1,7);
floodfill(950,500,7);
settextstyle(0,0,4);
setcolor(0);
setbkcolor(7);
outtextxy(170,480,"Sign Up!");
outtextxy(875,480,"Sign In");
int x = getmaxx( );
int y = getmaxy( );
setmousequeuestatus(WM_LBUTTONDOWN);
while(!ismouseclick(WM_LBUTTONDOWN));
{
getmouseclick(WM_LBUTTONDOWN,x,y);
if((x>840 && x<1140) && (y>450 && y<550))
login();
else if((x>140 && x<440) && (y>450 && y<550))
signup();
}
system("pause");
return 0;
}
开发者ID:Saurabha94,项目名称:The-V-Play-Store,代码行数:40,代码来源:welcome.cpp
示例9: ClearColor
void ClearColor ()
{
setfillstyle(5,15); // body color
bar (175,225,225,300); // body
setfillstyle(4,15); // hand and foot color
bar (164,230,174,250); // left hand
bar (226,230,236,250); // right hand
bar (164,295,174,315); // left foot
bar (226,295,236,315); // right foot
setfillstyle(4,15); // hat color
fillellipse( 200, 35, 75, 20 ); // hat
setfillstyle(8,0); // eyes color
fillellipse( 160, 100, 15, 15 ); // eyes
fillellipse( 240, 100, 15, 15 ); // eyes
setfillstyle(10,15); // nose color
fillellipse( 200, 135, 22, 22 ); // nose
setfillstyle(8,0); // mouth color
fillellipse( 200, 185, 50, 15 ); // mouth
}
开发者ID:cagriemreakin,项目名称:C-Programming,代码行数:26,代码来源:purble+Game.c
示例10: setcolor
void table::draw()
{
setcolor(8);
int i;
for(i=1;i<tdepth;i++)
{
line(x1-i,y1-i,x1-i,y2+i);
line(x1-i,y1-i,x2+i,y1-i);
}
setcolor(15);
for(i=1;i<tdepth;i++)
{
line(x2+i,y2+i,x1-i,y2+i);
line(x2+i,y2+i,x2+i,y1-i);
}
setcolor(0);
line(x1-tdepth,y1-tdepth,x1,y1);
line(x2+tdepth,y1-tdepth,x2,y1);
line(x1-tdepth,y2+tdepth,x1,y2);
line(x2+tdepth,y2+tdepth,x2,y2);
rectangle(x1-tdepth,y1-tdepth,x2+tdepth,y2+tdepth);
setfillstyle(1,15);
bar(x1,y1,x2,y2);
setcolor(0);
int xpos=x1,ypos=y1;
for(int loop=0;loop<=visiblecolumns;loop++)
{
line(xpos,y1,xpos,y2);
xpos+=colwidth;
}
for(loop=0;loop<=visiblerows;loop++)
{
line(x1,ypos,x2,ypos);
ypos+=rowwidth;
}
int x,y;
settextjustify(justify,BOTTOM_TEXT);
setcolor(0);
for(int row=windowposy;row<windowposy+visiblerows;row++)
for(int col=windowposx;col<windowposx+visiblecolumns;col++)
{
x=x1+(col-windowposx+1)*colwidth;
y=y1+(row-windowposy+1)*rowwidth;
outtextxy(x,y,getcvalue(col,row));
}
int srow,scol;
srow=selected/COLS;
scol=selected%COLS;
drawvalue(scol,srow,15,4);
}
开发者ID:choptastic,项目名称:OldCode-Public,代码行数:52,代码来源:GUI.CPP
示例11: clear_teris
void clear_teris(TERIS t)
{
int x, y, i;
for(i=0; i<4; i++)
{
x = X0+(t.x+all_shape[t.shape][t.rotate].p[i].x)*32;
y = Y0+(t.y+all_shape[t.shape][t.rotate].p[i].y)*32;
setfillstyle(SOLID_FILL, DARKGRAY);
bar(x+1, y+1, x+32-1, y+32-1);
setcolor(DARKGRAY);
rectangle(x, y, x+32, y+32);
}
}
开发者ID:Uyouii,项目名称:tetris,代码行数:13,代码来源:teris.c
示例12: win_drawcircle
void win_drawcircle(int i,int j,int fillcolor,int fillstyle)
{
int a;
struct fillsettingstype b;
if ((i<N)&&(i>=0)&&(j>=0)&&(j<N))
{
a=getcolor();
getfillsettings(&b);
setcolor((fillcolor<10)?(fillcolor+1):(fillcolor-1));
line(table[i][j].x-RADIOUS,table[i][j].y,table[i][j].x+RADIOUS,table[i][j].y);
line(table[i][j].x,table[i][j].y-RADIOUS,table[i][j].x,table[i][j].y+RADIOUS);
setcolor(fillcolor);
setfillstyle(fillstyle,fillcolor);
circle(table[i][j].x,table[i][j].y,RADIOUS);
floodfill(table[i][j].x,table[i][j].y,fillcolor);
setcolor(a);
setfillstyle(b.pattern,b.color);
}
else
printf("ERROR i=%d j=%d ",i,j);
}
开发者ID:toalexjin,项目名称:gobang,代码行数:22,代码来源:chess_1.c
示例13: enemy_car_clear1
void enemy_car_clear1(int x1, int y1)
{
setcolor(BLACK);
p=-400;
while(p<=480)
{
setcolor(BLACK);
setfillstyle(1,BLACK);
rectangle(480,p+y1,490,p+50+y1);
floodfill(481,p+48+y1,BLACK);
p+=100;
}
p=-400;
while(p<=480)
{
setcolor(BLACK);
setfillstyle(1,BLACK);
rectangle(100,p+y1,110,p+50+y1);
floodfill(101,p+48+y1,BLACK);
p+=100;
}
}
开发者ID:shivambca,项目名称:Highway-Riders-Car-Race,代码行数:22,代码来源:CARRACE.CPP
示例14: car_clear
void car_clear(int x, int y)
{
setcolor(BLACK);
rectangle(x,y,x+70,y+80);
arc(x+35,y+20,30,150,40);
line(x+11,y+90,x+59,y+90);
line(x+70,y+80,x+59,y+90);
line(x,y+80,x+11,y+90);
setfillstyle(1,BLACK);
floodfill(x+10,y+10,BLACK); // for car body
floodfill(x+15,y-10,BLACK); // for car front bonat
floodfill(x+35,y+85,BLACK); // for car rear bonat
}
开发者ID:shivambca,项目名称:Highway-Riders-Car-Race,代码行数:13,代码来源:CARRACE.CPP
示例15: status
status(char *st)
{
if(strcmp(st,st1)!=0)
{
setfillstyle(SOLID_FILL,1);
bar(0,getmaxy()-15,getmaxx(),getmaxy());
setcolor(14);
settextstyle(0,0,1);
outtextxy(20,getmaxy()-12,st);
strcpy(st1,st);
}
return 0;
}
开发者ID:ramkicse,项目名称:Snake-Game-in-C,代码行数:13,代码来源:snake.C
示例16: drawstack
void drawstack(int x,int y,int size,int color)
{
int i;
setfillstyle(SOLID_FILL,BLACK);
bar(x,y,x+100,y+(size+1)*20);
setcolor(color);
line(x,y,x,y+size*20);
line(x+30,y,x+30,y+size*20);
for(i=0;i<=size;i++)
line(x,y+i*20,x+30,y+i*20);
}
开发者ID:ralapaty,项目名称:datastructuresgraphicaldemoinC,代码行数:13,代码来源:stack.c
示例17: window
void window(int l,int h,int x1,int y1,int col,char *string,int flag)
{
if((getpixel(x1-l/2+6,y1-h/2+5)!=col)&&flag == 0)
{setcolor(7);rectangle(x1-l/2+3,y1-h/2+2,x1+l/2-3,y1+h/2-5);
if(col==3||col==6)col =1;
setfillstyle(SOLID_FILL,col);floodfill(x1,y1,7);setcolor(8);
rectangle(x1-l/2+3,y1-h/2+2,x1+l/2-3,y1+h/2-5);
line(x1-l/2+3,y1+h/2-5,x1-l/2,y1+h/2);
line(x1+l/2-3,y1+h/2-5,x1+l/2,y1+h/2);
line(x1-l/2,y1+h/2,x1-l/2,y1-h/2);
line(x1+l/2,y1+h/2,x1+l/2,y1-h/2);
line(x1-l/2,y1-h/2,x1+l/2,y1-h/2);
setfillstyle(SOLID_FILL,8);floodfill(x1,y1-h/2+1,8);
setcolor(7);line(x1-l/2,y1+h/2,x1+l/2,y1+h/2);
rectangle(x1-l/2+3,y1-h/2+2,x1+l/2-3,y1+h/2-5);
line(x1-l/2+3,y1+h/2-5,x1-l/2,y1+h/2);
line(x1+l/2-3,y1+h/2-5,x1+l/2,y1+h/2);
setfillstyle(SOLID_FILL,7);floodfill(x1,y1+h/2-1,7);
}settextstyle(DEFAULT_FONT,HORIZ_DIR,2);setcolor(10);
if((MM.x>x1-l/2+1&&MM.x<x1+l/2-1)&&(MM.y>y1-h/2+1&&MM.y<y1+h/2-1))setcolor(6);
outtextxy(x1-(strlen(string)*7.5),y1-9,string);
}
开发者ID:smoitra87,项目名称:OpticsXII,代码行数:22,代码来源:OPTICS+V4.1.CPP
示例18: show_page
void show_page()//显示翻译的页数
{
char t1[10],t2[10],t3[]="of",t4[]="page";
setfillstyle(SOLID_FILL,BLACK);
bar(700,5,795,26);
sprintf(t1,"%d",page);
sprintf(t2,"%d",total);
outtextxy(700,10,t4);
outtextxy(700+strlen(t4)*8+4,10,t1);
outtextxy(700+strlen(t4)*8+strlen(t1)*8+8,10,t3);
outtextxy(700+strlen(t4)*8+strlen(t1)*8+strlen(t3)*8+12,10,t2);
}
开发者ID:Uyouii,项目名称:dict,代码行数:13,代码来源:dict.c
示例19: box
void box (int x1,int y1,int x2,int y2,int relleno,int color)
{int poly[8];
poly[0]=x1;
poly[1]=y1;
poly[2]=x2;
poly[3]=y1;
poly[4]=x2;
poly[5]=y2;
poly[6]=x1;
poly[7]=y2;
setfillstyle (relleno,color);
fillpoly (4,poly);
}
开发者ID:ManuelAlanis,项目名称:BatallaNaval-C,代码行数:13,代码来源:JUEGO.CPP
示例20: begain
begain()/*游戏开始画面*/
{
int i,j;
loop: cleardevice();
MouseOn();
MouseSetXY(180,30);
MouseX=180;
MouseY=30;
scorenum=0;
setfillstyle(SOLID_FILL,7);
bar(190,60,390,290);
setfillstyle(SOLID_FILL,8);
for(i=100;i<300;i+=20)/*画格子*/
for(j=200;j<400;j+=20)
bar(j-8,i+8,j+8,i-8);
setcolor(7);
setfillstyle(SOLID_FILL,YELLOW);/*画脸*/
fillellipse(290,75,10,10);
setcolor(YELLOW);
setfillstyle(SOLID_FILL,0);
fillellipse(285,75,2,2);
fillellipse(295,75,2,2);
setcolor(0);
bar(287,80,293,81);
randomize();
for(i=0;i<10;i++)
for(j=0;j<10;j++)
{
num[i][j]=random(7)+10;/*用10代表地雷算了*/
if(num[i][j]==10)
scorenum++;
}
sprintf(score,"%d",scorenum);
setcolor(1);
settextstyle(0,0,2);
outtextxy(210,70,score);
scorenum=100-scorenum;/*为了后面判断胜利*/
return 0;
}
开发者ID:sleepandeat,项目名称:CPPpp,代码行数:39,代码来源:SAOLEI.CPP
注:本文中的setfillstyle函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论