Commit fbcbd09b authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Fix StringFormatFlagsLineLimit handling.

parent 8dafdd0a
...@@ -4572,7 +4572,11 @@ GpStatus gdip_format_string(HDC hdc, ...@@ -4572,7 +4572,11 @@ GpStatus gdip_format_string(HDC hdc,
bounds.Width = size.cx; bounds.Width = size.cx;
if(height + size.cy > nheight) if(height + size.cy > nheight)
{
if (format->attr & StringFormatFlagsLineLimit)
break;
bounds.Height = nheight - (height + size.cy); bounds.Height = nheight - (height + size.cy);
}
else else
bounds.Height = size.cy; bounds.Height = size.cy;
...@@ -4615,7 +4619,7 @@ GpStatus gdip_format_string(HDC hdc, ...@@ -4615,7 +4619,7 @@ GpStatus gdip_format_string(HDC hdc,
/* Stop if this was a linewrap (but not if it was a linebreak). */ /* Stop if this was a linewrap (but not if it was a linebreak). */
if ((lret == fitcpy) && format && if ((lret == fitcpy) && format &&
(format->attr & (StringFormatFlagsNoWrap | StringFormatFlagsLineLimit))) (format->attr & StringFormatFlagsNoWrap))
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment