mirror of
https://gitee.com/Lamdonn/varch.git
synced 2025-12-06 08:46:42 +08:00
53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
## Introduction
|
|
|
|
cPatten is a simple character art module that forms artistic characters with characters.
|
|
|
|
## Interface
|
|
|
|
### Functions
|
|
|
|
```c
|
|
int cPatten_setMask(char c); // Set the characters that make up the artistic characters
|
|
void cPatten_showChar(char c); // Display the artistic character
|
|
void cPatten_showString(char *s); // Display the artistic string
|
|
```
|
|
|
|
Usage Example:
|
|
```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");
|
|
}
|
|
```
|
|
Result:
|
|
```
|
|
` ` ``` ``` ``` ` `
|
|
` ` ` ` ` ` ` ` ` `
|
|
` ` ````` ``` ` `````
|
|
` ` ` ` ` ` ` ` ` `
|
|
` ` ` ` ` ``` ` `
|
|
* * *** *** *** * *
|
|
* * * * * * * * * *
|
|
* * ***** *** * *****
|
|
* * * * * * * * * *
|
|
* * * * * *** * *
|
|
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
|
|
# # ### ### ### # #
|
|
# # # # # # # # # #
|
|
# # ##### ### # #####
|
|
# # # # # # # # # #
|
|
# # # # # ### # #
|
|
|
|
```
|