From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#17115: 24.3.50; possible bug in drawing images with box on W32 Date: Thu, 27 Mar 2014 13:48:10 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1395895752 18171 80.91.229.3 (27 Mar 2014 04:49:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2014 04:49:12 +0000 (UTC) To: 17115@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 27 05:49:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WT2Fi-0005yA-3V for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Mar 2014 05:49:18 +0100 Original-Received: from localhost ([::1]:51705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT2Fh-0006Qj-Q2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Mar 2014 00:49:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT2FZ-0006IQ-Bc for bug-gnu-emacs@gnu.org; Thu, 27 Mar 2014 00:49:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT2FT-0002QC-5d for bug-gnu-emacs@gnu.org; Thu, 27 Mar 2014 00:49:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT2FT-0002Q4-2Z for bug-gnu-emacs@gnu.org; Thu, 27 Mar 2014 00:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WT2FS-0007P4-GQ for bug-gnu-emacs@gnu.org; Thu, 27 Mar 2014 00:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Mar 2014 04:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17115-submit@debbugs.gnu.org id=B17115.139589569928369 (code B ref 17115); Thu, 27 Mar 2014 04:49:02 +0000 Original-Received: (at 17115) by debbugs.gnu.org; 27 Mar 2014 04:48:19 +0000 Original-Received: from localhost ([127.0.0.1]:51642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT2El-0007NV-49 for submit@debbugs.gnu.org; Thu, 27 Mar 2014 00:48:19 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:58055) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT2Eh-0007N9-QS for 17115@debbugs.gnu.org; Thu, 27 Mar 2014 00:48:17 -0400 Original-Received: from fermat.math.s.chiba-u.ac.jp (fermat [133.82.132.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id E9243C055D for <17115@debbugs.gnu.org>; Thu, 27 Mar 2014 13:48:10 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87439 Archived-At: >>>>> On Thu, 27 Mar 2014 11:42:09 +0900, YAMAMOTO Mitsuharu 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@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;