emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#17115: closed (24.3.50; possible bug in drawing im


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17115: closed (24.3.50; possible bug in drawing images with box on W32)
Date: Fri, 28 Mar 2014 00:56:02 +0000

Your message dated Fri, 28 Mar 2014 09:54:53 +0900
with message-id <address@hidden>
and subject line Re: bug#17115: 24.3.50; possible bug in drawing images with 
box on W32
has caused the debbugs.gnu.org bug report #17115,
regarding 24.3.50; possible bug in drawing images with box on W32
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17115: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17115
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; possible bug in drawing images with box on W32 Date: Thu, 27 Mar 2014 11:42:09 +0900 User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)
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.

                                     YAMAMOTO Mitsuharu
                                address@hidden

=== modified file 'src/w32term.c'
*** src/w32term.c       2014-03-26 15:57:13 +0000
--- src/w32term.c       2014-03-27 02:32:46 +0000
***************
*** 2082,2094 ****
  static void
  x_draw_image_glyph_string (struct glyph_string *s)
  {
-   int x, y;
    int box_line_hwidth = eabs (s->face->box_line_width);
    int box_line_vwidth = max (s->face->box_line_width, 0);
    int height;
    HBITMAP pixmap = 0;
  
!   height = s->height - 2 * box_line_vwidth;
  
    /* Fill background with face under the image.  Do it only if row is
       taller than image or if image has a clip mask to reduce
--- 2082,2097 ----
  static void
  x_draw_image_glyph_string (struct glyph_string *s)
  {
    int box_line_hwidth = eabs (s->face->box_line_width);
    int box_line_vwidth = max (s->face->box_line_width, 0);
    int height;
    HBITMAP pixmap = 0;
  
!   height = s->height;
!   if (s->slice.y == 0)
!     height -= box_line_vwidth;
!   if (s->slice.y + s->slice.height >= s->img->height)
!     height -= box_line_vwidth;
  
    /* Fill background with face under the image.  Do it only if row is
       taller than image or if image has a clip mask to reduce
***************
*** 2101,2112 ****
        || s->img->pixmap == 0
        || s->width != s->background_width)
      {
!       x = s->x;
        if (s->first_glyph->left_box_line_p
          && s->slice.x == 0)
!       x += box_line_hwidth;
  
-       y = s->y;
        if (s->slice.y == 0)
        y += box_line_vwidth;
  
--- 2104,2120 ----
        || s->img->pixmap == 0
        || s->width != s->background_width)
      {
!       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;
  
***************
*** 2150,2156 ****
        }
        else
  #endif
!       x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
  
        s->background_filled_p = 1;
      }
--- 2158,2164 ----
        }
        else
  #endif
!       x_draw_glyph_string_bg_rect (s, x, y, width, height);
  
        s->background_filled_p = 1;
      }




--- End Message ---
--- Begin Message --- Subject: Re: bug#17115: 24.3.50; possible bug in drawing images with box on W32 Date: Fri, 28 Mar 2014 09:54:53 +0900 User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)
Version: 24.4

>>>>> On Thu, 27 Mar 2014 18:29:29 +0200, Eli Zaretskii <address@hidden> said:

>> 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.

> Confirmed.  (And yes, you need to use the XPM image to reproduce the
> problem; PNG doesn't.)

Thanks for confirming this.

>> === modified file 'src/w32term.c'
>> *** src/w32term.c    2014-03-26 15:57:13 +0000
>> --- src/w32term.c    2014-03-27 02:32:46 +0000

> Thanks, I installed this with minor changes (to keep the original
> code style intact).

I moved the variables `x' and `y' to the inner block because that
makes the code look more like the corresponding one in xterm.c.

Anyway, I've just installed the patch for X11.  Closing.

                                     YAMAMOTO Mitsuharu
                                address@hidden


--- End Message ---

reply via email to

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