gdiplus: Fix StringFormatFlagsLineLimit handling.
Vincent Povirk
madewokherd at gmail.com
Tue Nov 19 15:59:10 CST 2013
Turns out this is supposed to prevent the display of lines that don't
fit vertically, not stop after a line wrap.
For bug 34458.
-------------- next part --------------
From e30c33c09451f80450ba71d265f0f8f698c5b75e Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 19 Nov 2013 15:56:49 -0600
Subject: [PATCH] gdiplus: Fix StringFormatFlagsLineLimit handling.
---
dlls/gdiplus/graphics.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 366fa0e..c2a5d42 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4572,7 +4572,11 @@ GpStatus gdip_format_string(HDC hdc,
bounds.Width = size.cx;
if(height + size.cy > nheight)
+ {
+ if (format->attr & StringFormatFlagsLineLimit)
+ break;
bounds.Height = nheight - (height + size.cy);
+ }
else
bounds.Height = size.cy;
@@ -4615,7 +4619,7 @@ GpStatus gdip_format_string(HDC hdc,
/* Stop if this was a linewrap (but not if it was a linebreak). */
if ((lret == fitcpy) && format &&
- (format->attr & (StringFormatFlagsNoWrap | StringFormatFlagsLineLimit)))
+ (format->attr & StringFormatFlagsNoWrap))
break;
}
--
1.8.1.2
More information about the wine-patches
mailing list