[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116871: Fix bug #17115 with displaying on w32 im
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 r116871: Fix bug #17115 with displaying on w32 images that have 'box' face. |
Date: |
Thu, 27 Mar 2014 16:26:25 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116871
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17115
author: YAMAMOTO Mitsuharu <address@hidden>
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-03-27 18:25:17 +0200
message:
Fix bug #17115 with displaying on w32 images that have 'box' face.
src/w32term.c (x_draw_image_glyph_string): Fix computation of height
and width of image background when it is displayed with a 'box'
face.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32term.c w32term.c-20091113204419-o5vbwnq5f7feedwu-950
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-03-26 17:55:31 +0000
+++ b/src/ChangeLog 2014-03-27 16:25:17 +0000
@@ -1,3 +1,9 @@
+2014-03-27 YAMAMOTO Mitsuharu <address@hidden>
+
+ * w32term.c (x_draw_image_glyph_string): Fix computation of height
+ and width of image background when it is displayed with a 'box'
+ face. (Bug#17115)
+
2014-03-26 Paul Eggert <address@hidden>
More backward-compatible fix to char-equal core dump (Bug#17011).
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2014-03-24 08:50:17 +0000
+++ b/src/w32term.c 2014-03-27 16:25:17 +0000
@@ -2085,10 +2085,14 @@
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;
+ int height, width;
HBITMAP pixmap = 0;
- height = s->height - 2 * box_line_vwidth;
+ 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,10 +2105,14 @@
|| s->img->pixmap == 0
|| s->width != s->background_width)
{
+ width = s->background_width;
x = s->x;
if (s->first_glyph->left_box_line_p
&& s->slice.x == 0)
- x += box_line_hwidth;
+ {
+ x += box_line_hwidth;
+ width -= box_line_hwidth;
+ }
y = s->y;
if (s->slice.y == 0)
@@ -2150,7 +2158,7 @@
}
else
#endif
- x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
+ x_draw_glyph_string_bg_rect (s, x, y, width, height);
s->background_filled_p = 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116871: Fix bug #17115 with displaying on w32 images that have 'box' face.,
Eli Zaretskii <=