[2/2] gdiplus: Fix the clipping region calculation.

Dmitry Timoshkov dmitry at baikal.ru
Mon May 14 05:20:27 CDT 2012


offsety is used for computing final string position inside of the passed in
rectangle based of the format alignment flags, but clipping region (created
from corners[] array) should not be affected by it.
---
 dlls/gdiplus/graphics.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 7ea1a54..703ffd7 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -5190,9 +5190,9 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
                       (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X));
 
     rectcpy[3].X = rectcpy[0].X = rect->X;
-    rectcpy[1].Y = rectcpy[0].Y = rect->Y + offsety;
+    rectcpy[1].Y = rectcpy[0].Y = rect->Y;
     rectcpy[2].X = rectcpy[1].X = rect->X + rect->Width;
-    rectcpy[3].Y = rectcpy[2].Y = rect->Y + offsety + rect->Height;
+    rectcpy[3].Y = rectcpy[2].Y = rect->Y + rect->Height;
     transform_and_round_points(graphics, corners, rectcpy, 4);
 
     scaled_rect.X = 0.0;
-- 
1.7.10.1




More information about the wine-patches mailing list