Dmitry Timoshkov : gdiplus: GdipMeasureCharacterRanges shouldn' t add margins to string bounds.

Alexandre Julliard julliard at winehq.org
Fri Mar 15 11:51:34 CDT 2013


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Mar 15 13:37:53 2013 +0900

gdiplus: GdipMeasureCharacterRanges shouldn't add margins to string bounds.

---

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

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index eb3f228..93f85b1 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4684,11 +4684,6 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
     scaled_rect.Y = layoutRect->Y * args.rel_height;
     scaled_rect.Width = layoutRect->Width * args.rel_width;
     scaled_rect.Height = layoutRect->Height * args.rel_height;
-    if (scaled_rect.Width >= 0.5)
-    {
-        scaled_rect.Width -= margin_x * 2.0 * args.rel_width;
-        if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */
-    }
 
     get_font_hfont(graphics, font, stringFormat, &gdifont, NULL);
     oldfont = SelectObject(hdc, gdifont);
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index fe525b6..4df2119 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -4033,11 +4033,8 @@ todo_wine
     set_rect_empty(&bounds);
     status = GdipGetRegionBounds(region, graphics, &bounds);
     expect(Ok, status);
-todo_wine
     expectf_(5.0 + margin_x, bounds.X, 1.0);
-todo_wine
     expectf(5.0, bounds.Y);
-todo_wine
     expectf_(width_1, bounds.Width, 1.0);
 todo_wine
     expectf_(height - margin_y, bounds.Height, 1.0);
@@ -4071,13 +4068,9 @@ todo_wine
     set_rect_empty(&bounds);
     status = GdipGetRegionBounds(region, graphics, &bounds);
     expect(Ok, status);
-todo_wine
     expectf_(5.0 + margin_x, bounds.X, 1.0);
-todo_wine
     expectf(5.0, bounds.Y);
-todo_wine
     expectf_(width_1, bounds.Width, 1.0);
-todo_wine
     expectf(height_rgn, bounds.Height);
 
     set_rect_empty(&rect);
@@ -4234,6 +4227,7 @@ todo_wine
     set_rect_empty(&bounds);
     status = GdipGetRegionBounds(region, graphics, &bounds);
     expect(Ok, status);
+todo_wine
     expectf_(5.0 + width_rgn/2.0, bounds.X, 1.0);
 todo_wine
     expectf_(5.0 + height_rgn/2.0, bounds.Y, 1.0);




More information about the wine-cvs mailing list