emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

box drawing fix


From: Kenichi Handa
Subject: box drawing fix
Date: Mon, 16 Oct 2000 13:27:49 +0900 (JST)

I've just installed the attached change to fix incorrect box
drawing.   Gerd, could you please confirm that it is the
correct fix.

But, there still exists a bug in box drawing.  Please try this:

(save-excursion
  (make-face 'b)
  (set-face-attribute 'b nil :box 4)
  (goto-char (point-min))
  (insert "abc\ndef\n")
  (put-text-property 1 4 'face 'b)
  (put-text-property 5 8 'face 'b))

The first line correctly has a box face, but the second line
doesn't have a correct box.  When I wait for a few seconds
without doing anything, the screen is updated correctly, but
when I type C-l after that, the second line is display
incrrectly again.

For the moment, I don't know how to fix it.

---
Ken'ichi HANDA
address@hidden

2000-10-16  Kenichi Handa  <address@hidden>

        * xterm.c (x_draw_box_rect): Fix the calculation of width and
        height for XFillRectangle.

*** xterm.c.~1.544~     Thu Oct 12 14:16:37 2000
--- xterm.c     Mon Oct 16 13:07:45 2000
***************
*** 3621,3641 ****
    
    /* Top.  */
    XFillRectangle (s->display, s->window, s->gc,
!                 left_x, top_y, right_x - left_x, width);
  
    /* Left.  */
    if (left_p)
      XFillRectangle (s->display, s->window, s->gc,
!                   left_x, top_y, width, bottom_y - top_y);
  
    /* Bottom.  */
    XFillRectangle (s->display, s->window, s->gc,
!                 left_x, bottom_y - width, right_x - left_x, width);
    
    /* Right.  */
    if (right_p)
      XFillRectangle (s->display, s->window, s->gc,
!                   right_x - width, top_y, width, bottom_y - top_y);
  
    XSetForeground (s->display, s->gc, xgcv.foreground);
    XSetClipMask (s->display, s->gc, None);
--- 3621,3641 ----
    
    /* Top.  */
    XFillRectangle (s->display, s->window, s->gc,
!                 left_x, top_y, right_x - left_x + 1, width);
  
    /* Left.  */
    if (left_p)
      XFillRectangle (s->display, s->window, s->gc,
!                   left_x, top_y, width, bottom_y - top_y + 1);
  
    /* Bottom.  */
    XFillRectangle (s->display, s->window, s->gc,
!                 left_x, bottom_y - width + 1, right_x - left_x + 1, width);
    
    /* Right.  */
    if (right_p)
      XFillRectangle (s->display, s->window, s->gc,
!                   right_x - width + 1, top_y, width, bottom_y - top_y + 1);
  
    XSetForeground (s->display, s->gc, xgcv.foreground);
    XSetClipMask (s->display, s->gc, None);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]