Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FontPack.h@0:e4ea0ca99174, 2010-11-04 (annotated)
- Committer:
- mrfurious
- Date:
- Thu Nov 04 23:00:34 2010 +0000
- Revision:
- 0:e4ea0ca99174
1.1.1
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mrfurious | 0:e4ea0ca99174 | 1 | namespace FontPack { |
| mrfurious | 0:e4ea0ca99174 | 2 | |
| mrfurious | 0:e4ea0ca99174 | 3 | |
| mrfurious | 0:e4ea0ca99174 | 4 | typedef struct { |
| mrfurious | 0:e4ea0ca99174 | 5 | int nCols; |
| mrfurious | 0:e4ea0ca99174 | 6 | const char* col; |
| mrfurious | 0:e4ea0ca99174 | 7 | char getCol(int i) { |
| mrfurious | 0:e4ea0ca99174 | 8 | return col[i]; |
| mrfurious | 0:e4ea0ca99174 | 9 | } |
| mrfurious | 0:e4ea0ca99174 | 10 | } FontPackChar; |
| mrfurious | 0:e4ea0ca99174 | 11 | |
| mrfurious | 0:e4ea0ca99174 | 12 | |
| mrfurious | 0:e4ea0ca99174 | 13 | |
| mrfurious | 0:e4ea0ca99174 | 14 | |
| mrfurious | 0:e4ea0ca99174 | 15 | /* |
| mrfurious | 0:e4ea0ca99174 | 16 | FN: writeChar |
| mrfurious | 0:e4ea0ca99174 | 17 | Function takes the char to write to the map, the map to write to, |
| mrfurious | 0:e4ea0ca99174 | 18 | and where in the map to start the writing. |
| mrfurious | 0:e4ea0ca99174 | 19 | RETURN: index in map after inserting char (the caret) |
| mrfurious | 0:e4ea0ca99174 | 20 | */ |
| mrfurious | 0:e4ea0ca99174 | 21 | int writeChar(char a, char map[], int index, int col = 0); |
| mrfurious | 0:e4ea0ca99174 | 22 | /*FN: blank |
| mrfurious | 0:e4ea0ca99174 | 23 | Inserts a blank. |
| mrfurious | 0:e4ea0ca99174 | 24 | RETURN: index in map after inserting blank |
| mrfurious | 0:e4ea0ca99174 | 25 | */ |
| mrfurious | 0:e4ea0ca99174 | 26 | int blank(int index); |
| mrfurious | 0:e4ea0ca99174 | 27 | |
| mrfurious | 0:e4ea0ca99174 | 28 | /* |
| mrfurious | 0:e4ea0ca99174 | 29 | FN: getChar |
| mrfurious | 0:e4ea0ca99174 | 30 | RETURN: a struct encapsulating the requested char. |
| mrfurious | 0:e4ea0ca99174 | 31 | */ |
| mrfurious | 0:e4ea0ca99174 | 32 | FontPackChar getChar(char a); |
| mrfurious | 0:e4ea0ca99174 | 33 | } |