[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 77c3d41adc: Prevent text decorations from overwriting surroun
From: |
Eli Zaretskii |
Subject: |
Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X |
Date: |
Mon, 10 Jan 2022 19:47:36 +0200 |
> From: Po Lu <luangruo@yahoo.com>
> Date: Mon, 10 Jan 2022 19:58:12 +0800
>
> Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
>
> > Prevent text decorations from overwriting surrounding areas on X
> >
> > * src/xterm.c (x_draw_underwave): New parameter
> > `decoration_width'.
> > (x_draw_glyph_string): Constrain decoration width to current
> > text area.
>
> This happens on X because nothing actually clips the decoration to the
> string's area when we draw the decoration.
I'm not sure I understand what clipping did you have in mind. In
x_draw_underwave, for example, we have this:
/* Find and set clipping rectangle */
wave_clip.x = x0;
wave_clip.y = y0;
wave_clip.width = width;
wave_clip.height = wave_height;
get_glyph_string_clip_rect (s, &string_clip);
if (!gui_intersect_rectangles (&wave_clip, &string_clip, &final_clip))
return;
XSetClipRectangles (display, s->gc, 0, 0, &final_clip, 1, Unsorted);
Isn't this the clipping? Or what am I missing?
> You can test by running custom-set-faces on default, enabling an
> underline or overline, and typing in a field that is extended to the end
> of the line.
Please show some actual Lisp to try this, so we wouldn't need to guess
whether the problem doesn't exist or we failed to reproduce correctly.
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Po Lu, 2022/01/10
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X,
Eli Zaretskii <=
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Po Lu, 2022/01/10
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Eli Zaretskii, 2022/01/11
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Po Lu, 2022/01/11
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Eli Zaretskii, 2022/01/11
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Po Lu, 2022/01/11
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Jose Antonio Ortega Ruiz, 2022/01/11
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Po Lu, 2022/01/11
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Jose Antonio Ortega Ruiz, 2022/01/12
- Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X, Eli Zaretskii, 2022/01/11