- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
void DrawingLibrary::drawText(int x0, int y0, char string[], int strlen, int red, int green, int blue, int alpha) {
for(int i = 0; i < strlen; ++i) {
char chr = string[i];
int sX = x0 + i * 8;
// проходимся по символам, рисуя их
if(chr == '!') {
bool symbol[8][8] = {{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,0,0,0}};
this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
}
else if(chr == '"') {
bool symbol[8][8] = {{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}};
this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
}
else if(chr == '#') {
bool symbol[8][8] = {{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,1,1,1,1,1},{0,0,0,0,1,0,1,0},{0,0,0,1,1,1,1,1},{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,0,0,0,0,0}};
this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
}
/* еще 135 строк такого "кода" */
else if(chr == 'э') {
bool symbol[8][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,1,1,1,0},{0,0,0,0,0,0,0,1},{0,0,0,0,0,1,1,1},{0,0,0,0,0,0,0,1},{0,0,0,0,1,1,1,0},{0,0,0,0,0,0,0,0}};
this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
}
else if(chr == 'ю') {
bool symbol[8][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,1,0,0,1,0},{0,0,0,1,0,1,0,1},{0,0,0,1,1,1,0,1},{0,0,0,1,0,1,0,1},{0,0,0,1,0,0,1,0},{0,0,0,0,0,0,0,0}};
this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
}
else if(chr == 'я') {
bool symbol[8][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,1,1,1},{0,0,0,0,1,0,0,1},{0,0,0,0,0,1,1,1},{0,0,0,0,0,1,0,1},{0,0,0,0,1,0,0,1},{0,0,0,0,0,0,0,0}};
this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
}
}
}