Mercurial > emacs
changeset 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 | 4ed1978642cb |
children | 4cfa4fd4a53f |
files | src/xterm.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Mon Aug 07 21:52:14 2000 +0000 +++ b/src/xterm.c Mon Aug 07 21:52:54 2000 +0000 @@ -3720,8 +3720,18 @@ } else { - XCopyArea (s->display, s->img->pixmap, s->window, s->gc, - 0, 0, s->img->width, s->img->height, x, y); + unsigned long mask = GCClipXOrigin | GCClipYOrigin | GCFunction; + XGCValues xgcv; + XRectangle clip_rect, image_rect, r; + + x_get_glyph_string_clip_rect (s, &clip_rect); + image_rect.x = x; + image_rect.y = y; + image_rect.width = s->img->width; + image_rect.height = s->img->height; + if (x_intersect_rectangles (&clip_rect, &image_rect, &r)) + XCopyArea (s->display, s->img->pixmap, s->window, s->gc, + r.x - x, r.y - y, r.width, r.height, r.x, r.y); /* When the image has a mask, we can expect that at least part of a mouse highlight or a block cursor will