[2/3] gdi32: If there is no clipping rect, EMREXTTEXTOUT shouldn't have a bounding rect

Dmitry Timoshkov dmitry at codeweavers.com
Sun May 25 07:31:20 CDT 2008


Hello,

this patch eliminates one more difference in generated EMFs between Wine
and Windows.

Changelog:
    gdi32: If there is no clipping rect, EMREXTTEXTOUT shouldn't have
    a bounding rect.
---
 dlls/gdi32/enhmfdrv/graphics.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c
index 4a695f2..28f34cd 100644
--- a/dlls/gdi32/enhmfdrv/graphics.c
+++ b/dlls/gdi32/enhmfdrv/graphics.c
@@ -775,6 +775,13 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
         }
     }
 
+    if (!lprect)
+    {
+        pemr->rclBounds.left = pemr->rclBounds.top = 0;
+        pemr->rclBounds.right = pemr->rclBounds.bottom = -1;
+        goto no_bounds;
+    }
+
     switch (textAlign & (TA_LEFT | TA_RIGHT | TA_CENTER)) {
     case TA_CENTER: {
         pemr->rclBounds.left  = x - (textWidth / 2) - 1;
@@ -814,6 +821,7 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
     }
     }
 
+no_bounds:
     ret = EMFDRV_WriteRecord( dev, &pemr->emr );
     if(ret)
         EMFDRV_UpdateBBox( dev, &pemr->rclBounds );
-- 
1.5.5.1






More information about the wine-patches mailing list