aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-12 15:09:58 +0000
committerGerd Moellmann2001-01-12 15:09:58 +0000
commit22d650b85106da5329b270858126562b0dd3faa0 (patch)
tree7c4694354087eed4d32b0055ed17bf59adb3b8bf /src
parent3ed61e75f4cd3577b58c225cc882500465053465 (diff)
downloademacs-22d650b85106da5329b270858126562b0dd3faa0.tar.gz
emacs-22d650b85106da5329b270858126562b0dd3faa0.zip
(x_produce_image_glyph, x_draw_image_foreground)
(x_draw_image_relief, x_draw_image_foreground_1) (x_draw_image_glyph_string): Adapt to the change of image margins.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 8f04bcefe83..fadeae0e057 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1504,8 +1504,8 @@ x_produce_image_glyph (it)
1504 prepare_image_for_display (it->f, img); 1504 prepare_image_for_display (it->f, img);
1505 1505
1506 it->ascent = it->phys_ascent = image_ascent (img, face); 1506 it->ascent = it->phys_ascent = image_ascent (img, face);
1507 it->descent = it->phys_descent = img->height + 2 * img->margin - it->ascent; 1507 it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent;
1508 it->pixel_width = img->width + 2 * img->margin; 1508 it->pixel_width = img->width + 2 * img->hmargin;
1509 1509
1510 it->nglyphs = 1; 1510 it->nglyphs = 1;
1511 1511
@@ -3844,11 +3844,8 @@ x_draw_image_foreground (s)
3844 3844
3845 /* If there is a margin around the image, adjust x- and y-position 3845 /* If there is a margin around the image, adjust x- and y-position
3846 by that margin. */ 3846 by that margin. */
3847 if (s->img->margin) 3847 x += s->img->hmargin;
3848 { 3848 y += s->img->vmargin;
3849 x += s->img->margin;
3850 y += s->img->margin;
3851 }
3852 3849
3853 if (s->img->pixmap) 3850 if (s->img->pixmap)
3854 { 3851 {
@@ -3933,11 +3930,8 @@ x_draw_image_relief (s)
3933 3930
3934 /* If there is a margin around the image, adjust x- and y-position 3931 /* If there is a margin around the image, adjust x- and y-position
3935 by that margin. */ 3932 by that margin. */
3936 if (s->img->margin) 3933 x += s->img->hmargin;
3937 { 3934 y += s->img->vmargin;
3938 x += s->img->margin;
3939 y += s->img->margin;
3940 }
3941 3935
3942 if (s->hl == DRAW_IMAGE_SUNKEN 3936 if (s->hl == DRAW_IMAGE_SUNKEN
3943 || s->hl == DRAW_IMAGE_RAISED) 3937 || s->hl == DRAW_IMAGE_RAISED)
@@ -3982,11 +3976,8 @@ x_draw_image_foreground_1 (s, pixmap)
3982 3976
3983 /* If there is a margin around the image, adjust x- and y-position 3977 /* If there is a margin around the image, adjust x- and y-position
3984 by that margin. */ 3978 by that margin. */
3985 if (s->img->margin) 3979 x += s->img->hmargin;
3986 { 3980 y += s->img->vmargin;
3987 x += s->img->margin;
3988 y += s->img->margin;
3989 }
3990 3981
3991 if (s->img->pixmap) 3982 if (s->img->pixmap)
3992 { 3983 {
@@ -4074,7 +4065,6 @@ x_draw_image_glyph_string (s)
4074{ 4065{
4075 int x, y; 4066 int x, y;
4076 int box_line_width = s->face->box_line_width; 4067 int box_line_width = s->face->box_line_width;
4077 int margin = s->img->margin;
4078 int height; 4068 int height;
4079 Pixmap pixmap = None; 4069 Pixmap pixmap = None;
4080 4070
@@ -4085,7 +4075,8 @@ x_draw_image_glyph_string (s)
4085 flickering. */ 4075 flickering. */
4086 s->stippled_p = s->face->stipple != 0; 4076 s->stippled_p = s->face->stipple != 0;
4087 if (height > s->img->height 4077 if (height > s->img->height
4088 || margin 4078 || s->img->hmargin
4079 || s->img->vmargin
4089 || s->img->mask 4080 || s->img->mask
4090 || s->img->pixmap == 0 4081 || s->img->pixmap == 0
4091 || s->width != s->background_width) 4082 || s->width != s->background_width)