📄 funtc169b.dat
字号:
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
char *fname[] = { "EMPTY_FILL","SOLID_FILL","LINE_FILL","LTSLASH_FILL","SLASH_FILL","BKSLASH_FILL","LTBKSLASH_FILL","HATCH_FILL","XHATCH_FILL","INTERLEAVE_FILL","WIDE_DOT_FILL","CLOSE_DOT_FILL","USER_FILL"};
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
struct fillsettingstype fillinfo;
int midx, midy;
char patstr[40], colstr[40];
initgraph(&gdriver, &gmode, );
errorcode = graphresult();
if (errorcode != grOk)
{
printf("Graphics error: %s", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
midx = getmaxx() / 2;
midy = getmaxy() / 2;
getfillsettings(&fillinfo);
sprintf(patstr, "%s is the fill style.", fname[fillinfo.pattern]);
sprintf(colstr, "%d is the fill color.", fillinfo.color);
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(midx, midy, patstr);
outtextxy(midx, midy+2*textheight("W"), colstr);
getch();
closegraph();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -