mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-08 23:14:06 +08:00
42 lines
994 B
HTML
42 lines
994 B
HTML
<h1>标准库函数 - write_chi_font</h1>
|
||
|
||
|
||
<p>原型:extern void write_chi_font(int x,int y,char *buf);</p>
|
||
|
||
<p>用法:#include <system.h></p>
|
||
|
||
<p>功能:写汉字点阵</p>
|
||
|
||
<p>说明:可以把get_chi_font所取回的点阵信息写到屏幕上指定位置。</p>
|
||
|
||
举例:<pre><code class="language-c">
|
||
|
||
// write_chi_font.c
|
||
|
||
#include <system.h>
|
||
|
||
main()
|
||
{
|
||
char buf[32];
|
||
char *s="文曲星",*p;
|
||
int x=0,y=0; // screen location to display HZ
|
||
|
||
clrscr();
|
||
gotoxy(10,10); // Hide Cursor
|
||
|
||
p=s;
|
||
while(*p)
|
||
{
|
||
get_chi_font(p,buf);
|
||
write_chi_font(x,y,buf);
|
||
p+=2; // forward a Chinese Character(HZ), two bytes
|
||
x+=16;
|
||
}
|
||
|
||
getchar();
|
||
return 0;
|
||
}
|
||
|
||
</code></pre>相关函数:<a href="get_chi_font.html">get_chi_font</a>
|
||
|