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.
Dependents: TouchScreenCalibrate TouchScreenGUIDemo
Fork of UniGraphic by
Diff: Graphics/GraphicsDisplay.cpp
- Revision:
- 34:091b954c3205
- Parent:
- 32:f5f3df66420e
diff -r 5743f9c16aa2 -r 091b954c3205 Graphics/GraphicsDisplay.cpp
--- a/Graphics/GraphicsDisplay.cpp Mon Apr 11 16:54:35 2016 +0000
+++ b/Graphics/GraphicsDisplay.cpp Sun Jun 21 15:23:02 2020 +0100
@@ -291,23 +291,30 @@
}
}
window(char_x, char_y,fonthor*fontzoomhor,fontvert*fontzoomver); // char box
- zeichen = &font[((c-firstch) * fontoffset) + 4]; // start of char bitmap
- w = zeichen[0]; // width of actual char
- // construct the char into the buffer
- for (j=0; j<fontvert; j++) { // vert line
- for (v=0; v<fontzoomver; v++) { // repeat horiz line for vertical zooming
- for (i=0; i<fonthor; i++) { // horz line
- z = zeichen[(fontbpl * i) + ((j & 0xF8) >> 3)+1];
- b = 1 << (j & 0x07);
- if (( z & b ) == 0x00) {
- // pixel(char_x+i,char_y+j,0);
- window_pushpixel(_background, fontzoomhor); //(color, howmany)
- } else {
- // pixel(char_x+i,char_y+j,1);
- window_pushpixel(_foreground, fontzoomhor);
- }
- }
- } //for each zoomed vert
+ if ((c < firstch) || (c > lastch)) { // test char range - if not exist fill with blank
+ for (i = 0; i < fonthor*fontvert*fontzoomver;i++){
+ window_pushpixel(_background, fontzoomhor); //(color, howmany)
+ }
+ }
+ else{
+ zeichen = &font[((c-firstch) * fontoffset) + 4]; // start of char bitmap
+ w = zeichen[0]; // width of actual char
+ // construct the char into the buffer
+ for (j=0; j<fontvert; j++) { // vert line
+ for (v=0; v<fontzoomver; v++) { // repeat horiz line for vertical zooming
+ for (i=0; i<fonthor; i++) { // horz line
+ z = zeichen[(fontbpl * i) + ((j & 0xF8) >> 3)+1];
+ b = 1 << (j & 0x07);
+ if (( z & b ) == 0x00) {
+ // pixel(char_x+i,char_y+j,0);
+ window_pushpixel(_background, fontzoomhor); //(color, howmany)
+ } else {
+ // pixel(char_x+i,char_y+j,1);
+ window_pushpixel(_foreground, fontzoomhor);
+ }
+ }
+ } //for each zoomed vert
+ }
}
if(fontprop)
{
