From 685b936214e980f04be4f79631ff022268d7e946 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 16 Feb 2004 20:35:52 +0000 Subject: [PATCH] The clip rectangle for ExtTextOut is in logical coords. --- dlls/x11drv/text.c | 6 +++++- dlls/x11drv/xrender.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/x11drv/text.c b/dlls/x11drv/text.c index 5d88a520b30..14a28089c92 100644 --- a/dlls/x11drv/text.c +++ b/dlls/x11drv/text.c @@ -219,7 +219,11 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags, if (flags & ETO_CLIPPED) { - HRGN clip_region = CreateRectRgn( lprect->left, lprect->top, lprect->right, lprect->bottom ); + HRGN clip_region; + RECT clip_rect = *lprect; + + LPtoDP( physDev->hdc, (POINT *)&clip_rect, 2 ); + clip_region = CreateRectRgnIndirect( &clip_rect ); /* make a copy of the current device region */ saved_region = CreateRectRgn( 0, 0, 0, 0 ); CombineRgn( saved_region, physDev->region, 0, RGN_COPY ); diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c index e335d74f340..941bd53b04e 100644 --- a/dlls/x11drv/xrender.c +++ b/dlls/x11drv/xrender.c @@ -1128,7 +1128,11 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag if (flags & ETO_CLIPPED) { - HRGN clip_region = CreateRectRgn( lprect->left, lprect->top, lprect->right, lprect->bottom ); + HRGN clip_region; + RECT clip_rect = *lprect; + + LPtoDP( hdc, (POINT *)&clip_rect, 2 ); + clip_region = CreateRectRgnIndirect( &clip_rect ); /* make a copy of the current device region */ saved_region = CreateRectRgn( 0, 0, 0, 0 ); CombineRgn( saved_region, physDev->region, 0, RGN_COPY );