bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix, GSSimpleLayoutManager


From: Georg Fleischmann
Subject: Fix, GSSimpleLayoutManager
Date: Thu, 19 Jul 2001 22:42:50 +0200

Hi,

here is a fix for [GSSimpleLayoutManager 
boundingRectForGlyphRange:inTextContainer:].

For a zero range the method now returns a zero width.
For a nonzero range the range is not inverted any more.
I have no idea what the inversion was intended for, but it seemed wrong to me.  
Now it works as expected.

To be sure, I compared the results of the method with OpenStep, and obtained  
the same return values (except for the height of a zero range).
So, I'm quite sure I did it the right way.

Georg


2001-07-19  Georg Fleischmann

        * gui/Source/GSSimpleLayoutManager.m
        [GSSimpleLayoutManager boundingRectForGlyphRange:inTextContainer:]:
        no inversion of rect.width (width - rect.size.width)



diff -u gui/Source/GSSimpleLayoutManager.m.old 
gui/Source/GSSimpleLayoutManager.m

--- gui/Source/GSSimpleLayoutManager.m.old      Tue Jul 10 04:30:27 2001
+++ gui/Source/GSSimpleLayoutManager.m  Thu Jul 19 22:06:19 2001
@@ -323,7 +323,7 @@

   if (![_textStorage length] || ![_lineLayoutInformation count])
     {
-      return NSMakeRect(0, 0, width, 12);
+      return NSMakeRect(0, 0, 0, 12);
     }

   i1 = [self lineLayoutIndexForGlyphIndex: aRange.location];
@@ -339,7 +339,6 @@
       rect1 = NSUnionRect(rect1, currentInfo->usedRect);
     }

-  rect1.size.width = width - rect1.origin.x;
   return rect1;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]