Mercurial > emacs
comparison src/xterm.c @ 38586:fde4f76bf531
(x_get_glyph_string_clip_rect): Minor cleanup.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 27 Jul 2001 15:28:08 +0000 |
parents | bd96796d6d4b |
children | aa6c656692d3 |
comparison
equal
deleted
inserted
replaced
38585:f2c0f6df43ab | 38586:fde4f76bf531 |
---|---|
2839 r->x = WINDOW_AREA_TO_FRAME_PIXEL_X (s->w, s->area, 0); | 2839 r->x = WINDOW_AREA_TO_FRAME_PIXEL_X (s->w, s->area, 0); |
2840 r->width = window_box_width (s->w, s->area); | 2840 r->width = window_box_width (s->w, s->area); |
2841 r->height = s->row->visible_height; | 2841 r->height = s->row->visible_height; |
2842 } | 2842 } |
2843 | 2843 |
2844 /* Don't use S->y for clipping because it doesn't take partially | |
2845 visible lines into account. For example, it can be negative for | |
2846 partially visible lines at the top of a window. */ | |
2847 if (!s->row->full_width_p | |
2848 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row)) | |
2849 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); | |
2850 else | |
2851 r->y = max (0, s->row->y); | |
2852 | |
2853 /* If drawing a tool-bar window, draw it over the internal border | |
2854 at the top of the window. */ | |
2855 if (s->w == XWINDOW (s->f->tool_bar_window)) | |
2856 r->y -= s->f->output_data.x->internal_border_width; | |
2857 | |
2858 /* If S draws overlapping rows, it's sufficient to use the top and | 2844 /* If S draws overlapping rows, it's sufficient to use the top and |
2859 bottom of the window for clipping because this glyph string | 2845 bottom of the window for clipping because this glyph string |
2860 intentionally draws over other lines. */ | 2846 intentionally draws over other lines. */ |
2861 if (s->for_overlaps_p) | 2847 if (s->for_overlaps_p) |
2862 { | 2848 { |
2863 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); | 2849 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); |
2864 r->height = window_text_bottom_y (s->w) - r->y; | 2850 r->height = window_text_bottom_y (s->w) - r->y; |
2865 } | 2851 } |
2866 | 2852 else |
2853 { | |
2854 /* Don't use S->y for clipping because it doesn't take partially | |
2855 visible lines into account. For example, it can be negative for | |
2856 partially visible lines at the top of a window. */ | |
2857 if (!s->row->full_width_p | |
2858 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row)) | |
2859 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); | |
2860 else | |
2861 r->y = max (0, s->row->y); | |
2862 | |
2863 /* If drawing a tool-bar window, draw it over the internal border | |
2864 at the top of the window. */ | |
2865 if (s->w == XWINDOW (s->f->tool_bar_window)) | |
2866 r->y -= s->f->output_data.x->internal_border_width; | |
2867 } | |
2868 | |
2867 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y); | 2869 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y); |
2868 } | 2870 } |
2869 | 2871 |
2870 | 2872 |
2871 /* Set clipping for output of glyph string S. S may be part of a mode | 2873 /* Set clipping for output of glyph string S. S may be part of a mode |