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

44 lines
1.3 KiB
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>标准库函数 - 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>相关函数:无