Dmitry Timoshkov : gdiplus: Do not convert range_rect.X twice.

Alexandre Julliard julliard at winehq.org
Fri Aug 24 13:46:44 CDT 2012


Module: wine
Branch: master
Commit: 7a1ccd8abe04a2eeb27f9215ff910a6e45688d8c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7a1ccd8abe04a2eeb27f9215ff910a6e45688d8c

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Aug 24 15:42:47 2012 +0900

gdiplus: Do not convert range_rect.X twice.

---

 dlls/gdiplus/graphics.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 5e76927..0056a2f 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4909,7 +4909,7 @@ static GpStatus measure_ranges_callback(HDC hdc,
 
             GetTextExtentExPointW(hdc, string + index, range_end - index,
                                   INT_MAX, NULL, NULL, &range_size);
-            range_rect.Width = (bounds->X + range_size.cx - range_rect.X) / args->rel_width;
+            range_rect.Width = (bounds->X + range_size.cx) / args->rel_width - range_rect.X;
 
             stat = GdipCombineRegionRect(args->regions[i], &range_rect, CombineModeUnion);
             if (stat != Ok)




More information about the wine-cvs mailing list