Files
uTools-Manuals/docs/c/TextOut.html
T
fofolee 38dcd51d8a v0.0.2
2019-04-21 11:50:48 +08:00

44 lines
1.3 KiB
HTML

<h1>标准库函数 - TextOut</h1>
<p>原型:extern void TextOut(int x, int y, char *str, int mode);</p>
<p>用法:#include &lt;system.h></p>
<p>功能:在屏幕上指定位置输出字符串</p>
<p>说明:outtextxy为指向TextOut的宏,用法相同。</p>
<pre><code class="language-c">
str所指向字符串可以为中文或英文。中文显示成16x16点阵,英文显示成8x16点阵。
mode决定往屏幕上写的方式,其值含义如下:
0:背景透明,点阵中为0的点不显示。
1:正常方式,即点阵中为0的点擦除,为1的点显示。
2:反显方式,即点阵中为1的点擦除,为0的点显示。
3:异或方式,即点阵中点的值和屏幕当前位置的值作异或后取值,为0则擦除,为1显示。
</code></pre>
举例:<pre><code class="language-c">
// TextOut.c
#include &lt;system.h>
main()
{
clrscr();
TextOut(0,0,"文曲星",1);
TextOut(10,10,"文曲星",0);
TextOut(20,20,"您好",2);
TextOut(30,30,"GGV-金远见",3);
getchar();
return 0;
}
</code></pre>相关函数:无