mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-21 04:55:02 -05:00
Call draw_stretch_before *after* setting up the clip region.
A small bug in yesterday's work: since in Cairo mode draw_stretch_before changes the transformation matrix, if we do it before calling draw_clip then the clip region will be interpreted in the transformed coordinates. This caused a subtle display bug in yesterday's commit: drawing one half of double-height text would have drawn _both_ halves of it on to the window's backing pixmap, but only copied the correct half on to the window proper - but the overdrawing on the pixmap would have shown up if the window was hidden and re-exposed.
This commit is contained in:
parent
3c912e7994
commit
828ad5d6d4
@ -2635,6 +2635,12 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
|
|||||||
} else
|
} else
|
||||||
rlen = len;
|
rlen = len;
|
||||||
|
|
||||||
|
draw_clip(dctx,
|
||||||
|
x*inst->font_width+inst->window_border,
|
||||||
|
y*inst->font_height+inst->window_border,
|
||||||
|
rlen*widefactor*inst->font_width,
|
||||||
|
inst->font_height);
|
||||||
|
|
||||||
if ((lattr & LATTR_MODE) != LATTR_NORM) {
|
if ((lattr & LATTR_MODE) != LATTR_NORM) {
|
||||||
draw_stretch_before(dctx,
|
draw_stretch_before(dctx,
|
||||||
x*inst->font_width+inst->window_border,
|
x*inst->font_width+inst->window_border,
|
||||||
@ -2645,12 +2651,6 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
|
|||||||
((lattr & LATTR_MODE) == LATTR_BOT));
|
((lattr & LATTR_MODE) == LATTR_BOT));
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_clip(dctx,
|
|
||||||
x*inst->font_width+inst->window_border,
|
|
||||||
y*inst->font_height+inst->window_border,
|
|
||||||
rlen*widefactor*inst->font_width,
|
|
||||||
inst->font_height);
|
|
||||||
|
|
||||||
draw_set_colour(dctx, nbg);
|
draw_set_colour(dctx, nbg);
|
||||||
draw_rectangle(dctx, TRUE,
|
draw_rectangle(dctx, TRUE,
|
||||||
x*inst->font_width+inst->window_border,
|
x*inst->font_width+inst->window_border,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user