… | |
… | |
395 | void draw_text (Display *disp, Window root, GC WinGC, int x, int y, struct line_node *line, int foreground) |
395 | void draw_text (Display *disp, Window root, GC WinGC, int x, int y, struct line_node *line, int foreground) |
396 | { |
396 | { |
397 | if (line->wrapped_right && opt_justify && line->breaks) |
397 | if (line->wrapped_right && opt_justify && line->breaks) |
398 | { |
398 | { |
399 | int i; |
399 | int i; |
400 | for (i = 0; i < line->num_words; i++) { |
400 | for (i = 0; i < line->num_words; i++) |
401 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, |
401 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, |
402 | x + line->breaks[i].width + ((i * line->free_pixels) / (line->num_words - 1)) + continuation_width * line->wrapped_left, y, |
402 | x + line->breaks[i].width + ((i * line->free_pixels) / (line->num_words - 1)) |
|
|
403 | + continuation_width * line->wrapped_left, y, |
403 | line->line + line->breaks[i].index, |
404 | line->line + line->breaks[i].index, |
404 | line->breaks[i].len); |
405 | line->breaks[i].len); |
405 | } |
406 | |
406 | if (line->wrapped_left) |
407 | if (line->wrapped_left) |
407 | { |
408 | { |
408 | if (foreground) XSetForeground (disp, WinGC, continuation_color); |
409 | if (foreground) XSetForeground (disp, WinGC, continuation_color); |
409 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length); |
410 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length); |
410 | } |
411 | } |
411 | } |
412 | } |
412 | else |
413 | else |
413 | { |
414 | { |
414 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, x + continuation_width * line->wrapped_left, y, line->line, line->len); |
415 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, x + continuation_width * line->wrapped_left, |
|
|
416 | y, line->line, line->len); |
|
|
417 | |
415 | if (line->wrapped_left) |
418 | if (line->wrapped_left) |
416 | { |
419 | { |
417 | if (foreground) XSetForeground (disp, WinGC, continuation_color); |
420 | if (foreground) XSetForeground (disp, WinGC, continuation_color); |
418 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length); |
421 | XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length); |
419 | } |
422 | } |