Module: wine Branch: master Commit: d3bfa44d53fc2afef2dd5d9bec017d8f0ebd9f7f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3bfa44d53fc2afef2dd5d9bec...
Author: Huw Davies huw@codeweavers.com Date: Thu Feb 9 11:19:02 2012 +0000
gdi32: Intersect the background text box with the clip rectangle in device units.
---
dlls/gdi32/font.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 03314a8..e17dd44 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -2346,14 +2346,8 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, text_box.top = y - tm.tmAscent; text_box.bottom = y + tm.tmDescent;
- if(flags & ETO_CLIPPED) - { - text_box.left = max(lprect->left, text_box.left); - text_box.right = min(lprect->right, text_box.right); - text_box.top = max(lprect->top, text_box.top); - text_box.bottom = min(lprect->bottom, text_box.bottom); - } - if(text_box.left < text_box.right && text_box.top < text_box.bottom) + if (flags & ETO_CLIPPED) intersect_rect( &text_box, &text_box, &rc ); + if (!is_rect_empty( &text_box )) physdev->funcs->pExtTextOut( physdev, 0, 0, ETO_OPAQUE, &text_box, NULL, 0, NULL ); } }