Commit 81bbd17c authored by David Hedberg's avatar David Hedberg Committed by Alexandre Julliard

gdi32: Stay within the clipping area when painting text background.

parent bf192f6a
......@@ -2030,7 +2030,16 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
rc.right = x + width.x;
rc.top = y - tm.tmAscent;
rc.bottom = y + tm.tmDescent;
dc->funcs->pExtTextOut(dc->physDev, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL);
if(flags & ETO_CLIPPED)
{
rc.left = max(lprect->left, rc.left);
rc.right = min(lprect->right, rc.right);
rc.top = max(lprect->top, rc.top);
rc.bottom = min(lprect->bottom, rc.bottom);
}
if(rc.left < rc.right && rc.top < rc.bottom)
dc->funcs->pExtTextOut(dc->physDev, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment