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.
Fork of UniGraphicCyrillic by
Revision 36:d04939621de7, committed 2017-05-17
- Comitter:
- slavajm
- Date:
- Wed May 17 15:50:12 2017 +0000
- Parent:
- 35:77ba72271a4b
- Commit message:
- UniGraphic library with support Cyrillic symbols.
Changed in this revision
Graphics/GraphicsDisplay.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Graphics/GraphicsDisplay.cpp Tue Aug 16 13:23:04 2016 +0000 +++ b/Graphics/GraphicsDisplay.cpp Wed May 17 15:50:12 2017 +0000 @@ -255,54 +255,17 @@ } int GraphicsDisplay::_putc(int value) { - static int flagCir; - if (value>=208){flagCir=value;} else - /* if (value==208){flagCir=value;} else - if (value==209){flagCir=value;} else - if (value==210){flagCir=value;} else*/ + static int flagCyr; + if (value>=208){flagCyr=value;} else if (value == '\n') { // new line char_x = 0; char_y = char_y + fontvert*fontzoomver; if (char_y >= oriented_height - fontvert*fontzoomver) { char_y = 0; } - } else { - /* - int x = value / 100; - int y = (value-x*100) / 10; - int z = (value-x*100-y*10); - - character(char_x, char_y, 48+x); - character(char_x, char_y, 48+y); - character(char_x, char_y, 48+z); */ - /* if (flagCir==208) { - switch (value){ - case 129: value=168; break; - case 132: value=170; break; - case 134: value=178; break; - case 135: value=175; break; - default: - value+=48;break; - } - } - if (flagCir==209) { - switch (value){ - case 145: value=184; break; - case 148: value=186; break; - case 150: value=179; break; - case 151: value=191; break; - default: - value+=112;break; - } - } - if (flagCir==210) { - switch (value){ - case 144: value=165; break; - case 145: value=180; break; - } - }*/ - character(char_x, char_y,flagCir*256+value); - flagCir=0; + } else { + character(char_x, char_y,flagCyr*256+value); + flagCyr=0; if(auto_up) copy_to_lcd(); } return value;