lib/unigraphic/GraphicsDisplay.cpp

changeset 58
c1dfd75f2842
parent 45
2da50a3d4e9f
child 66
48f29a1d43d6
equal deleted inserted replaced
57:cce151e4bf3d 58:c1dfd75f2842
285 offset = font[0]; // bytes / char 285 offset = font[0]; // bytes / char
286 hor = font[1]; // get hor size of font 286 hor = font[1]; // get hor size of font
287 vert = font[2]; // get vert size of font 287 vert = font[2]; // get vert size of font
288 bpl = font[3]; // bytes per line 288 bpl = font[3]; // bytes per line
289 */ 289 */
290 /*
290 if (char_x + fonthor*fontzoomhor > oriented_width) { 291 if (char_x + fonthor*fontzoomhor > oriented_width) {
291 char_x = 0; 292 char_x = 0;
292 char_y = char_y + fontvert*fontzoomver; 293 char_y = char_y + fontvert*fontzoomver;
293 if (char_y > oriented_height - fontvert*fontzoomver) { 294 if (char_y > oriented_height - fontvert*fontzoomver) {
294 char_y = 0; 295 char_y = 0;
295 } 296 }
296 } 297 }
298 */
299 if (char_x + fonthor*fontzoomhor > oriented_width) {
300 // a bit brutal, but meh
301 // so if the char to write crosses the width, do not display it
302 return;
303 }
297 if ((c < firstch) || (c > lastch)) { // test char range - if not exist fill with blank 304 if ((c < firstch) || (c > lastch)) { // test char range - if not exist fill with blank
298 window(char_x, char_y, fonthor*fontzoomhor, fontvert*fontzoomver); // char box 305 window(char_x, char_y, fonthor*fontzoomhor, fontvert*fontzoomver); // char box
299 window_pushpixel(_background, fontzoomhor*fonthor*fontvert*fontzoomver); //(color, howmany) 306 window_pushpixel(_background, fontzoomhor*fonthor*fontvert*fontzoomver); //(color, howmany)
300 w = fonthor; 307 w = fonthor;
301 } else { 308 } else {

mercurial