diff -r d9c5eaf85fab -r 48f29a1d43d6 lib/unigraphic/GraphicsDisplay.cpp --- a/lib/unigraphic/GraphicsDisplay.cpp Mon Oct 04 21:14:39 2021 +0200 +++ b/lib/unigraphic/GraphicsDisplay.cpp Mon Oct 04 21:15:35 2021 +0200 @@ -277,9 +277,9 @@ { char_x=x; char_y=y; - int j,i,b; + unsigned int j, i, b; unsigned char* zeichen; - unsigned char z,w,v, wtot; + unsigned char z, w, v, wtot; /* // read font parameter from start of array offset = font[0]; // bytes / char @@ -301,6 +301,8 @@ // so if the char to write crosses the width, do not display it return; } + wtot = 0; + if ((c < firstch) || (c > lastch)) { // test char range - if not exist fill with blank window(char_x, char_y, fonthor*fontzoomhor, fontvert*fontzoomver); // char box window_pushpixel(_background, fontzoomhor*fonthor*fontvert*fontzoomver); //(color, howmany) @@ -353,7 +355,7 @@ void GraphicsDisplay::Bitmap_BW(Bitmap_s bm, int x, int y) { - int h,v,b; + unsigned int h,v,b; // int cropX; char d; if(x<0) x=0; @@ -376,17 +378,15 @@ } if(auto_up) copy_to_lcd(); } -void GraphicsDisplay::Bitmap(int x, int y, int w, int h,unsigned char *bitmap) +void GraphicsDisplay::Bitmap(unsigned int x, unsigned int y, unsigned int w, unsigned int h,unsigned char *bitmap) { int j; unsigned char padd; unsigned short *bitmap_ptr = (unsigned short *)bitmap; padd = w%2; // the lines are padded to multiple of 4 bytes in a bitmap - if(x<0) x=0; - else if(x>=oriented_width) return; - if(y<0) y=0; - else if(y>=oriented_height) return; + if(x >= oriented_width) return; + if(y >= oriented_height) return; int cropX = (x+w)-oriented_width; if(cropX<0) cropX=0; int cropY = (y+h)-oriented_height;