varch/doc/cPatten.en.md

1.4 KiB

Introduction

cPatten is a simple character art module that forms artistic characters with characters.

Interface

Functions

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:

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
 #     #   ###   ###     ###   #   #
 #     #  #   #  #   #  #   #  #   #
  #   #   #####  ###    #      #####
   # #    #   #  #  #   #   #  #   #
    #     #   #  #   #   ###   #   #