mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-10-11 08:53:20 +08:00
v0.0.2
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
<h1>标准库函数 - outtextxy</h1>
|
||||
|
||||
|
||||
<p>原型:extern void TextOut(int x, int y, char *str, int mode);</p>
|
||||
|
||||
<p>用法:#include <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 <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>相关函数:无
|
||||
|
||||
<h1>标准库函数 - outtextxy</h1>
|
||||
|
||||
|
||||
<p>原型:extern void TextOut(int x, int y, char *str, int mode);</p>
|
||||
|
||||
<p>用法:#include <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 <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>相关函数:无
|
||||
|
||||
|
Reference in New Issue
Block a user