]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_draw_image_foreground): Avoid drawing outside
authorGerd Moellmann <gerd@gnu.org>
Mon, 7 Aug 2000 21:54:31 +0000 (21:54 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 7 Aug 2000 21:54:31 +0000 (21:54 +0000)
of the clip area when image doesn't have a mask.

src/ChangeLog
src/xterm.c

index d0623ccc0b702401832e9e2a82332c963b6d5e82..1b1def22adbc3be9413c854bf980a8f442041223 100644 (file)
@@ -1,5 +1,20 @@
 2000-08-07  Gerd Moellmann  <gerd@gnu.org>
 
+       * xdisp.c (start_display): WHen starting display on a continuation
+       line, clear ascent and descent members of the iterator structure;
+       the height of the continued line does not affect the height of the
+       continuation line.
+       (make_cursor_line_fully_visible): Do nothing if cursor is on a
+       line taller than the window.
+       (redisplay_window) <forced window start>: Handle case that the
+       middle of the window is not found in any row.
+       (dump_glyph_row): Show more information.
+       (compute_line_metrics): Use MATRIX_FIRST_TEXT_ROW to determine the
+       first text line in a glyph matrix.
+
+       * xterm.c (x_draw_image_foreground): Avoid drawing outside
+       of the clip area when image doesn't have a mask.
+
        * fns.c (sweep_weak_table): Fix survival conditions for
        key-or-value and key-and-value weakness.
 
index aec7d3b7338431324ecea85b7ee12c4ce6f88837..391fd0f8ee19872e19059065bb719f9628537cb1 100644 (file)
@@ -3720,8 +3720,18 @@ x_draw_image_foreground (s)
        }
       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