uTools-Manuals/docs/c/write_chi_font.html
2019-04-21 11:50:48 +08:00

42 lines
994 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>标准库函数 - write_chi_font</h1>
<p>原型extern void write_chi_font(int x,int y,char *buf);</p>
<p>用法:#include &lt;system.h></p>
<p>功能:写汉字点阵</p>
<p>说明可以把get_chi_font所取回的点阵信息写到屏幕上指定位置。</p>
举例:<pre><code class="language-c">
// write_chi_font.c
#include &lt;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>