中文版的都可以!
不好意思,输入不会
给你一个输出的例子
/*Write by Cherryfly*/
#include "Conio.h"
#include "graphics.h"
#define closegr closegraph
char ying[]={
/* 以下是 '樱' 的 16点阵宋体 字模,32 byte */
0x20,0x00,0x27,0xFE,0x25,0x62,0x25,0x6A,
0xF5,0x6A,0x25,0x6A,0x71,0x88,0x6A,0x54,
0xA4,0xA2,0xA0,0x80,0x2F,0xFE,0x21,0x10,
0x23,0x20,0x20,0xE0,0x23,0x18,0x2C,0x08,
};
char hua[]={
/* 以下是 '花' 的 16点阵宋体 字模,32 byte */
0x04,0x40,0x04,0x40,0xFF,0xFE,0x04,0x40,
0x08,0x00,0x0C,0x80,0x08,0x90,0x18,0x98,
0x28,0xA0,0x48,0xC0,0x09,0x80,0x0A,0x84,
0x08,0x84,0x08,0x86,0x08,0x7C,0x08,0x00,
};
char fei[]={
/* 以下是 '飞' 的 16点阵宋体 字模,32 byte */
0x00,0x00,0xFF,0xC0,0x00,0x40,0x00,0x48,
0x00,0x50,0x00,0x60,0x00,0x60,0x00,0x50,
0x00,0x48,0x00,0x40,0x00,0x20,0x00,0x22,
0x00,0x12,0x00,0x0A,0x00,0x06,0x00,0x00,
};
char wu[]={
/* 以下是 '舞' 的 16点阵宋体 字模,32 byte */
0x10,0x00,0x1F,0xFC,0x2A,0x50,0x4A,0x50,
0xBF,0xFE,0x0A,0x50,0x7F,0xFE,0x10,0x10,
0x10,0x10,0x3E,0xFE,0x22,0x50,0x54,0x90,
0x08,0xFE,0x10,0x10,0x20,0x10,0x40,0x10,
};
void drawmat(char *mat,int matsize,int x,int y,int color)
/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/
{int i,j,k,n;
n=(matsize-1)/8+1;
for(j=0;j<matsize;j++)
for(i=0;i<n;i++)
for(k=0;k<8;k++)
if(mat[j*n+i]&(0x80>>k)) /*测试为1的位则显示*/
putpixel(x+i*8+k,y+j,color);
}
void initgr(void) /* BGI初始化 */
{
int gd = DETECT, gm = 0; /* 和gd = VGA,gm = VGAHI是同样效果 */
/* 注册BGI驱动后可以不需要.BGI文件的支持运行 */
registerbgidriver(EGAVGA_driver);
initgraph(&gd, &gm, "");
}
int main(void)
{
initgr(); /* BGI初始化 */
/*以下输出“樱花飞舞”*/
drawmat(ying,16,100,100,2) ;
drawmat(hua,16,200,100,4) ;
drawmat(fei,16,300,100,4) ;
drawmat(wu,16,400,100,4) ;
printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tCherryfly");
getch(); /* 暂停一下,看看前面绘图代码的运行结果 */
closegr(); /* 恢复TEXT屏幕模式 */
return 0;
}
/*Write by Cherryfly*/