mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-28 15:24:49 -05:00
Stop general_textout() from trying to slice up the input clipping
rectangle into smaller ones: it doesn't work any more, since the new variable-pitch code can now call general_textout() with a larger clipping rectangle than the text it's meant to be displaying. Instead, general_textout() now uses the same semantics as the next loop up in do_text_internal(): the first piece of text it displays uses the opacity setting passed in, which blanks the entire clipping rectangle if necessary, and then subsequent overlays are non-opaque. And the same clipping rectangle is used throughout. [originally from svn r9067]
This commit is contained in:
parent
a418e0d2dc
commit
a45f984c75
@ -1282,15 +1282,7 @@ static void general_textout(HDC hdc, int x, int y, CONST RECT *lprc,
|
||||
CONST INT *lpDx, int opaque)
|
||||
{
|
||||
int i, j, xp, xn;
|
||||
RECT newrc;
|
||||
|
||||
#ifdef FIXME_REMOVE_BEFORE_CHECKIN
|
||||
int k;
|
||||
debug(("general_textout: %d,%d", x, y));
|
||||
for(k=0;k<cbCount;k++)debug((" U+%04X", lpString[k]));
|
||||
debug(("\n rect: [%d,%d %d,%d]", lprc->left, lprc->top, lprc->right, lprc->bottom));
|
||||
debug(("\n"));
|
||||
#endif
|
||||
int bkmode = 0, got_bkmode = FALSE;
|
||||
|
||||
xp = xn = x;
|
||||
|
||||
@ -1311,46 +1303,25 @@ debug(("\n"));
|
||||
* function.
|
||||
*/
|
||||
if (rtl) {
|
||||
newrc.left = lprc->left + xp - x;
|
||||
newrc.right = lprc->left + xn - x;
|
||||
newrc.top = lprc->top;
|
||||
newrc.bottom = lprc->bottom;
|
||||
#ifdef FIXME_REMOVE_BEFORE_CHECKIN
|
||||
{
|
||||
int k;
|
||||
debug((" exact_textout: %d,%d", xp, y));
|
||||
for(k=0;k<j-i;k++)debug((" U+%04X", lpString[i+k]));
|
||||
debug(("\n rect: [%d,%d %d,%d]\n", newrc.left, newrc.top, newrc.right, newrc.bottom));
|
||||
}
|
||||
#endif
|
||||
exact_textout(hdc, xp, y, &newrc, lpString+i, j-i,
|
||||
exact_textout(hdc, xp, y, lprc, lpString+i, j-i,
|
||||
font_varpitch ? NULL : lpDx+i, opaque);
|
||||
} else {
|
||||
newrc.left = lprc->left + xp - x;
|
||||
newrc.right = lprc->left + xn - x;
|
||||
newrc.top = lprc->top;
|
||||
newrc.bottom = lprc->bottom;
|
||||
#ifdef FIXME_REMOVE_BEFORE_CHECKIN
|
||||
{
|
||||
int k;
|
||||
debug((" ExtTextOut : %d,%d", xp, y));
|
||||
for(k=0;k<j-i;k++)debug((" U+%04X", lpString[i+k]));
|
||||
debug(("\n rect: [%d,%d %d,%d]\n", newrc.left, newrc.top, newrc.right, newrc.bottom));
|
||||
}
|
||||
#endif
|
||||
ExtTextOutW(hdc, xp, y, ETO_CLIPPED | (opaque ? ETO_OPAQUE : 0),
|
||||
&newrc, lpString+i, j-i,
|
||||
lprc, lpString+i, j-i,
|
||||
font_varpitch ? NULL : lpDx+i);
|
||||
}
|
||||
|
||||
i = j;
|
||||
xp = xn;
|
||||
|
||||
bkmode = GetBkMode(hdc);
|
||||
got_bkmode = TRUE;
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
opaque = FALSE;
|
||||
}
|
||||
|
||||
#ifdef FIXME_REMOVE_BEFORE_CHECKIN
|
||||
debug(("general_textout: done, xn=%d\n", xn));
|
||||
#endif
|
||||
assert(xn - x >= lprc->right - lprc->left);
|
||||
if (got_bkmode)
|
||||
SetBkMode(hdc, bkmode);
|
||||
}
|
||||
|
||||
static int get_font_width(HDC hdc, const TEXTMETRIC *tm)
|
||||
|
Loading…
x
Reference in New Issue
Block a user