gdiplus: Round the layout rectangle down instead of up in gdip_format_string().
This commit is contained in:
parent
003333e6cb
commit
e9aef40c26
|
@ -4728,8 +4728,8 @@ GpStatus gdip_format_string(HDC hdc,
|
||||||
stringdup = GdipAlloc((length + 1) * sizeof(WCHAR));
|
stringdup = GdipAlloc((length + 1) * sizeof(WCHAR));
|
||||||
if(!stringdup) return OutOfMemory;
|
if(!stringdup) return OutOfMemory;
|
||||||
|
|
||||||
nwidth = roundr(rect->Width);
|
nwidth = rect->Width;
|
||||||
nheight = roundr(rect->Height);
|
nheight = rect->Height;
|
||||||
|
|
||||||
if (rect->Width >= INT_MAX || rect->Width < 0.5) nwidth = INT_MAX;
|
if (rect->Width >= INT_MAX || rect->Width < 0.5) nwidth = INT_MAX;
|
||||||
if (rect->Height >= INT_MAX || rect->Height < 0.5) nheight = INT_MAX;
|
if (rect->Height >= INT_MAX || rect->Height < 0.5) nheight = INT_MAX;
|
||||||
|
|
|
@ -3865,10 +3865,8 @@ todo_wine
|
||||||
set_rect_empty(&bounds);
|
set_rect_empty(&bounds);
|
||||||
status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines);
|
status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines);
|
||||||
expect(Ok, status);
|
expect(Ok, status);
|
||||||
todo_wine
|
|
||||||
expect(2, glyphs);
|
expect(2, glyphs);
|
||||||
expect(1, lines);
|
expect(1, lines);
|
||||||
todo_wine
|
|
||||||
expectf_(width_2, bounds.Width, 0.01);
|
expectf_(width_2, bounds.Width, 0.01);
|
||||||
expectf(height, bounds.Height);
|
expectf(height, bounds.Height);
|
||||||
|
|
||||||
|
@ -3878,10 +3876,8 @@ todo_wine
|
||||||
set_rect_empty(&bounds);
|
set_rect_empty(&bounds);
|
||||||
status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines);
|
status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, &glyphs, &lines);
|
||||||
expect(Ok, status);
|
expect(Ok, status);
|
||||||
todo_wine
|
|
||||||
expect(1, glyphs);
|
expect(1, glyphs);
|
||||||
expect(1, lines);
|
expect(1, lines);
|
||||||
todo_wine
|
|
||||||
expectf_(width_1, bounds.Width, 0.01);
|
expectf_(width_1, bounds.Width, 0.01);
|
||||||
expectf(height, bounds.Height);
|
expectf(height, bounds.Height);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue