GNU bug report logs -
#17115
24.3.50; possible bug in drawing images with box on W32
Previous Next
Reported by: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Date: Thu, 27 Mar 2014 02:43:02 UTC
Severity: normal
Found in version 24.3.50
Fixed in version 24.4
Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 17115 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Thu, 27 Mar 2014 11:42:09 +0900, YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> said:
> Recently I found a bug (which is different from Bug#17114) in drawing
> images with box on the Mac port, and I suspect it also happens on W32
> because their code are similar (though I can't test it). Could
> someone try if it is reproducible on W32 and if so, please try the
> patch at the end?
> Steps to reproduce:
> 1. $ emacs -Q -D &
> 2. (insert-image (create-image "splash.png")
> (propertize " " 'face '(:box (:line-width 5)))) C-j
> 3. C-p C-p
> Result:
> The left half of the character `t' just after the image gets erased.
Probably "splash.png" in Step 2 should have been "splash.xpm" on W32
so that s->img->mask != NULL holds.
And I managed to reproduce the similar problem also on X11 by
replacing Step 2 with:
2'. (insert-image (create-image "splash.png" nil nil :margin 10)
(propertize " " 'face '(:box (:line-width 5)))) C-j
Below is a patch for X11.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
=== modified file 'src/xterm.c'
*** src/xterm.c 2014-03-21 19:04:57 +0000
--- src/xterm.c 2014-03-27 04:34:57 +0000
***************
*** 2402,2416 ****
{
int x = s->x;
int y = s->y;
if (s->first_glyph->left_box_line_p
&& s->slice.x == 0)
! x += box_line_hwidth;
if (s->slice.y == 0)
y += box_line_vwidth;
! x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
}
s->background_filled_p = 1;
--- 2402,2420 ----
{
int x = s->x;
int y = s->y;
+ int width = s->background_width;
if (s->first_glyph->left_box_line_p
&& s->slice.x == 0)
! {
! x += box_line_hwidth;
! width -= box_line_hwidth;
! }
if (s->slice.y == 0)
y += box_line_vwidth;
! x_draw_glyph_string_bg_rect (s, x, y, width, height);
}
s->background_filled_p = 1;
This bug report was last modified 11 years and 59 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.