Commit d4107db6 authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Handle StringFormatFlagsNoWrap in GdipMeasureString.

parent 3f32083e
......@@ -1729,13 +1729,14 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
if(!graphics || !string || !font || !rect)
return InvalidParameter;
if(format || codepointsfitted || linesfilled){
if(codepointsfitted || linesfilled){
FIXME("not implemented for given parameters\n");
if(format)
TRACE("format attr is %d\n", format->attr);
return NotImplemented;
}
if(format)
TRACE("may be ignoring some format flags: attr %x\n", format->attr);
if(length == -1) length = lstrlenW(string);
stringdup = GdipAlloc(length * sizeof(WCHAR));
......@@ -1797,6 +1798,10 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
if(height > roundr(rect->Height))
break;
/* Stop if this was a linewrap (but not if it was a linebreak). */
if((lret == fitcpy) && format && (format->attr & StringFormatFlagsNoWrap))
break;
}
bounds->X = rect->X;
......
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