varch/doc/cPatten.md
2024-07-21 19:02:13 +08:00

54 lines
1.4 KiB
Markdown
Raw Permalink 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.

## 介绍
cPatten为一个简单的字符艺术字模块通过字符组成艺术字符。
## 接口
### 函数
```c
int cPatten_setMask(char c); // 设置艺术字组成字符
void cPatten_showChar(char c); // 显示艺术字符
void cPatten_showString(char *s); // 显示艺术字符串
```
使用例子:
```c
static void show(void)
{
cPatten_setMask('`');
cPatten_showString("Varch");
cPatten_setMask('*');
cPatten_showString("Varch");
cPatten_setMask('0');
cPatten_showString("Varch");
cPatten_setMask('#');
cPatten_showString("Varch");
}
```
结果:
```
` ` ``` ``` ``` ` `
` ` ` ` ` ` ` ` ` `
` ` ````` ``` ` `````
` ` ` ` ` ` ` ` ` `
` ` ` ` ` ``` ` `
* * *** *** *** * *
* * * * * * * * * *
* * ***** *** * *****
* * * * * * * * * *
* * * * * *** * *
0 0 000 000 000 0 0
0 0 0 0 0 0 0 0 0 0
0 0 00000 000 0 00000
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 000 0 0
# # ### ### ### # #
# # # # # # # # # #
# # ##### ### # #####
# # # # # # # # # #
# # # # # ### # #
```