Author: spouliot
Date: 2006-10-18 17:46:11 -0400 (Wed, 18 Oct 2006)
New Revision: 66804

Modified:
   trunk/libgdiplus/src/ChangeLog
   trunk/libgdiplus/src/graphics.c
Log:
2006-10-18  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * graphics.c: In MeasureString check for bounding box height when 
        calculating the number of characters to be drawn.



Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog      2006-10-18 20:51:23 UTC (rev 66803)
+++ trunk/libgdiplus/src/ChangeLog      2006-10-18 21:46:11 UTC (rev 66804)
@@ -1,3 +1,8 @@
+2006-10-18  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * graphics.c: In MeasureString check for bounding box height when 
+       calculating the number of characters to be drawn.
+
 2006-10-17  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * graphics.c: Another fix to StringAlignmentCenter when a single

Modified: trunk/libgdiplus/src/graphics.c
===================================================================
--- trunk/libgdiplus/src/graphics.c     2006-10-18 20:51:23 UTC (rev 66803)
+++ trunk/libgdiplus/src/graphics.c     2006-10-18 21:46:11 UTC (rev 66804)
@@ -2706,10 +2706,13 @@
        if (codepointsFitted) {
                /* how many characters from the string can be drawn in the 
boundingBox (#76664) */
                double max_width = boundingBox ? (boundingBox->X + 
boundingBox->Width) : rc->X + min (MaxX, rc->Width);
+               double max_height = boundingBox ? (boundingBox->Y + 
boundingBox->Height) : rc->Y + min (MaxY, rc->Height);
                int charactersFitted;
                for (charactersFitted = 0; charactersFitted < StringLen; 
charactersFitted++) {
                        if ((StringDetails[charactersFitted].PosX + 
StringDetails[charactersFitted].Width) > max_width)
                                break;
+                       if (StringDetails[charactersFitted].PosY + LineHeight > 
max_height)
+                               break;
                }
                *codepointsFitted = charactersFitted;
        }

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

Reply via email to