Dmitry Timoshkov : gdiplus: Round the layout rectangle down instead of up in gdip_format_string().
Alexandre Julliard
julliard at winehq.org
Mon Aug 20 14:16:19 CDT 2012
Module: wine
Branch: master
Commit: e9aef40c269cef91c81eebd0bfd43a30b730a041
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e9aef40c269cef91c81eebd0bfd43a30b730a041
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Mon Aug 20 12:07:57 2012 +0900
gdiplus: Round the layout rectangle down instead of up in gdip_format_string().
---
dlls/gdiplus/graphics.c | 4 ++--
dlls/gdiplus/tests/graphics.c | 4 ----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index c8fad68..a04446b 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4728,8 +4728,8 @@ GpStatus gdip_format_string(HDC hdc,
stringdup = GdipAlloc((length + 1) * sizeof(WCHAR));
if(!stringdup) return OutOfMemory;
- nwidth = roundr(rect->Width);
- nheight = roundr(rect->Height);
+ nwidth = rect->Width;
+ nheight = rect->Height;
if (rect->Width >= INT_MAX || rect->Width < 0.5) nwidth = INT_MAX;
if (rect->Height >= INT_MAX || rect->Height < 0.5) nheight = INT_MAX;
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 881f697..1288678 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -3865,10 +3865,8 @@ todo_wine
set_rect_empty(&bounds);
status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines);
expect(Ok, status);
-todo_wine
expect(2, glyphs);
expect(1, lines);
-todo_wine
expectf_(width_2, bounds.Width, 0.01);
expectf(height, bounds.Height);
@@ -3878,10 +3876,8 @@ todo_wine
set_rect_empty(&bounds);
status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines);
expect(Ok, status);
-todo_wine
expect(1, glyphs);
expect(1, lines);
-todo_wine
expectf_(width_1, bounds.Width, 0.01);
expectf(height, bounds.Height);
More information about the wine-cvs
mailing list