David Hedberg : gdi32: Stay within the clipping area when painting text background.
Alexandre Julliard
julliard at winehq.org
Thu Apr 7 07:36:49 CDT 2011
Module: wine
Branch: stable
Commit: 6997e20fa5a934a61275f268eca4e0178d02fc5d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6997e20fa5a934a61275f268eca4e0178d02fc5d
Author: David Hedberg <dhedberg at codeweavers.com>
Date: Sun Jan 30 20:47:55 2011 +0800
gdi32: Stay within the clipping area when painting text background.
(cherry picked from commit 81bbd17c406e37ea23e8f86f95d307c0c45e2bc7)
---
dlls/gdi32/font.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 2d51445..85f08cb 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -1987,7 +1987,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);
}
}
}
More information about the wine-cvs
mailing list