#84 Printing character at (x,y) overlaps with (x+1,y)

open
None
5
2012-05-12
2012-05-11
Anonymous
No

See attached example. This was generated by printing 10 lines using mvwaddstr() and then some single characters at different positions using mvwaddch(). A character displayed with mvwaddch(w, x, y, c) will overlap character at (x+1, y) by 1 pixel.

Discussion

  • Nobody/Anonymous

     
  • William McBrine

    William McBrine - 2012-05-12
    • assigned_to: nobody --> wmcbrine
     
  • William McBrine

    William McBrine - 2012-05-12

    You don't say what platform this is. Unless it's SDL or X11, I'd say it was an issue with your terminal.

     
  • obenard

    obenard - 2012-05-25

    OS: Win7
    Platform: Win32 console

    The problem occurs when using the following code:

    wattrset(td->win, color);
    mvwaddnwstr(td->win, y, x, buf, n);
    wattrset(td->win, A_NORMAL);

    Any value for 'color' that is nonzero (white color) gives the glitch.

     
  • obenard

    obenard - 2012-06-13

    I've recompiled ncurses for Windows and tested both ncurses and pdcurses with the following code:

    wattrset(win, somecolor);
    mvwaddch(win, y, x+1, somechar);
    wattrset(win, someothercolor);
    mvwaddch(win, y, x, someotherchar);
    wattrset(win, A_NORMAL);

    With ncurses, no problem.
    With pdcurses, the previous code 'eats' the first pixel to the left of the character at (y, x+1).