[Wine-patches] [eter-2.1 2/7] gdiplus: GdipDrawString should not clip the string if StringFormatFlagsNoClip is specified. (eterbug #9086)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Пн Мар 18 07:40:48 MSK 2013


(cherry picked from commit 9fb88c79994c8d5a1561ca446139bbf99386e68e)
---
 dlls/gdiplus/graphics.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 24e2c5a..d345787 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4904,7 +4904,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
     GpPointF pt[3], rectcpy[4];
     POINT corners[4];
     REAL rel_width, rel_height, margin_x;
-    INT save_state;
+    INT save_state, format_flags = 0;
     REAL offsety = 0.0;
     struct draw_string_args args;
     RectF scaled_rect;
@@ -4929,6 +4929,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
     if(format){
         TRACE("may be ignoring some format flags: attr %x\n", format->attr);
 
+        format_flags = format->attr;
+
         /* Should be no need to explicitly test for StringAlignmentNear as
          * that is default behavior if no alignment is passed. */
         if(format->vertalign != StringAlignmentNear){
@@ -4982,7 +4984,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
     if (scaled_rect.Width >= 1 << 23 || scaled_rect.Width < 0.5) scaled_rect.Width = 1 << 23;
     if (scaled_rect.Height >= 1 << 23 || scaled_rect.Height < 0.5) scaled_rect.Height = 1 << 23;
 
-    if (scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23)
+    if (!(format_flags & StringFormatFlagsNoClip) &&
+        scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23)
     {
         /* FIXME: If only the width or only the height is 0, we should probably still clip */
         rgn = CreatePolygonRgn(corners, 4, ALTERNATE);
-- 
1.8.2



Подробная информация о списке рассылки Wine-patches