Author: pbartok
Date: 2006-01-17 17:57:02 -0500 (Tue, 17 Jan 2006)
New Revision: 55700

Modified:
   trunk/libgdiplus/src/ChangeLog
   trunk/libgdiplus/src/graphics.c
Log:
2006-01-17  Peter Dennis Bartok  <[EMAIL PROTECTED]>

        * graphics.c: If no trim flag is set we need to wrap, not trim. Every
          character can be used as wrap character in that case. Fixes #76034



Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog      2006-01-17 21:52:54 UTC (rev 55699)
+++ trunk/libgdiplus/src/ChangeLog      2006-01-17 22:57:02 UTC (rev 55700)
@@ -1,3 +1,8 @@
+2006-01-17  Peter Dennis Bartok  <[EMAIL PROTECTED]>
+
+       * graphics.c: If no trim flag is set we need to wrap, not trim. Every
+         character can be used as wrap character in that case. Fixes #76034
+
 2006-01-16  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * graphics-path.c: Implemented GdipGetPathWorldBounds[I] minus Pen

Modified: trunk/libgdiplus/src/graphics.c
===================================================================
--- trunk/libgdiplus/src/graphics.c     2006-01-17 21:52:54 UTC (rev 55699)
+++ trunk/libgdiplus/src/graphics.c     2006-01-17 22:57:02 UTC (rev 55700)
@@ -2107,7 +2107,7 @@
 
                        /* Boy, this must be slow, FIXME somehow */
                        default: {
-                               if (fmt->trimming!=StringTrimmingCharacter) {
+                               if ((fmt->trimming != StringTrimmingCharacter) 
&& (fmt->trimming != StringTrimmingNone)) {
                                        break;
                                }
                                /* Fall through */
@@ -2159,7 +2159,7 @@
        }
 
 #ifdef DRAWSTRING_DEBUG
-       printf("Sanitized string: >%s<, length %d (utf8-length:%d)\n", String, 
StringLen, strlen(String));
+       printf("Sanitized string: >%s<, length %d (utf8-length:%d)\n", String, 
StringLen, strlen((char *)String));
 #endif
 
        /* Generate size array */
@@ -2235,7 +2235,11 @@
 #endif
                /* Remember where to wrap next, but only if wrapping allowed */
                if (((fmt->formatFlags & StringFormatFlagsNoWrap)==0) && 
(CurrentDetail->Flags & STRING_DETAIL_BREAK)) {
-                       WrapPoint=i+1;  /* We skip the break char itself, 
keeping it at the end of the old line */
+                       if (String[i] == ' ') {
+                               WrapPoint=i+1;  /* We skip the break char 
itself, keeping it at the end of the old line */
+                       } else {
+                               WrapPoint=i;
+                       }
 
                        if (CursorX>MaxX) {
                                WrapX=CursorX;
@@ -2937,7 +2941,7 @@
        }
 
 #ifdef DRAWSTRING_DEBUG
-       printf("Sanitized string: >%s<, length %d (utf8-length:%d)\n", String, 
StringLen, strlen(String));
+       printf("Sanitized string: >%s<, length %d (utf8-length:%d)\n", String, 
StringLen, strlen((char *)String));
 #endif
 
        /* Generate size array */

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to