comparison src/xterm.c @ 30653:319c3bad8ada

(x_draw_image_foreground): Avoid drawing outside of the clip area when image doesn't have a mask.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 07 Aug 2000 21:52:54 +0000
parents f69ecffe8453
children 730f55a93973
comparison
equal deleted inserted replaced
30652:4ed1978642cb 30653:319c3bad8ada
3718 XCopyArea (s->display, s->img->pixmap, s->window, s->gc, 3718 XCopyArea (s->display, s->img->pixmap, s->window, s->gc,
3719 r.x - x, r.y - y, r.width, r.height, r.x, r.y); 3719 r.x - x, r.y - y, r.width, r.height, r.x, r.y);
3720 } 3720 }
3721 else 3721 else
3722 { 3722 {
3723 XCopyArea (s->display, s->img->pixmap, s->window, s->gc, 3723 unsigned long mask = GCClipXOrigin | GCClipYOrigin | GCFunction;
3724 0, 0, s->img->width, s->img->height, x, y); 3724 XGCValues xgcv;
3725 XRectangle clip_rect, image_rect, r;
3726
3727 x_get_glyph_string_clip_rect (s, &clip_rect);
3728 image_rect.x = x;
3729 image_rect.y = y;
3730 image_rect.width = s->img->width;
3731 image_rect.height = s->img->height;
3732 if (x_intersect_rectangles (&clip_rect, &image_rect, &r))
3733 XCopyArea (s->display, s->img->pixmap, s->window, s->gc,
3734 r.x - x, r.y - y, r.width, r.height, r.x, r.y);
3725 3735
3726 /* When the image has a mask, we can expect that at 3736 /* When the image has a mask, we can expect that at
3727 least part of a mouse highlight or a block cursor will 3737 least part of a mouse highlight or a block cursor will
3728 be visible. If the image doesn't have a mask, make 3738 be visible. If the image doesn't have a mask, make
3729 a block cursor visible by drawing a rectangle around 3739 a block cursor visible by drawing a rectangle around