[4/10] gdiplus: handle StringFormatFlagsNoWrap in GdipMeasureString
Evan Stade
estade at gmail.com
Wed Aug 15 18:22:04 CDT 2007
Hi,
dlls/gdiplus/graphics.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 81ff9c1..754da27 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1729,13 +1729,14 @@ GpStatus WINGDIPAPI GdipMeasureString(Gp
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(Gp
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;
--
1.4.1
More information about the wine-patches
mailing list