[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bugs #9789] - cellFrameForText... in NSTextAttachmentCell is called rec
From: |
Alexander Malmberg |
Subject: |
[bugs #9789] - cellFrameForText... in NSTextAttachmentCell is called recursively |
Date: |
Sat, 04 Sep 2004 17:52:04 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 |
This mail is an automated notification from the bugs tracker
of the project: GNUstep.
/**************************************************************************/
[bugs #9789] Latest Modifications:
Changes by:
Alexander Malmberg <alexander@malmberg.org>
'Date:
Sat 09/04/04 at 21:46 (Europe/Stockholm)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Invalid
Assigned to | None | alexm
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
-gui is correct here. The rectangle returned from
-cellFrameForTextContainer:... is relative to the current position, and this
will be on the baseline, which implies that it's above the bottom of the line
frag. To get a cell that is as tall as the line frag, you need to place its
origin at the bottom of the line frag. In the example, you want:
return NSMakeRect(0, -p.y, lf.size.width-10, lf.size.height);
Unfortunately, there used to be a bug that would cause an incorrect current
position to be passed, but this is fixed in cvs 2004-09-04. I've also clarified
the NSTextAttachmentCell documentation about this.
/**************************************************************************/
[bugs #9789] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9789>
Project: GNUstep
Submitted by: Yen-Ju Chen
On: Tue 07/27/04 at 15:43
Category: Gui/AppKit
Severity: 5 - Average
Item Group: Bug
Resolution: Invalid
Privacy: Public
Assigned to: alexm
Status: Closed
Summary: - cellFrameForText... in NSTextAttachmentCell is called recursively
Original Submission: If a subclass of NSTextAttachmentCell returns
-cellFrameForTextContainer:proposedLineFragment:glyphPosition:characterIndex:
with a height of NSRect which is exactly the same as the height of the
proposedLineFragment,
this method will be called recursively and the height of proposedLineFragment
keep increasing.
An example looks like this:
- (NSRect) cellFrameForTextContainer: (NSTextContainer *)c
proposedLineFragment: (NSRect) lf
glyphPosition: (NSPoint) p
characterIndex: (unsigned int) ci
{
return NSMakeRect(0, 0, lf.size.width-10, lf.size.height);
}
It can be verified in HelpViewer.app by changing the return NSRect in HRCell.m
Follow-up Comments
------------------
-------------------------------------------------------
Date: Sat 09/04/04 at 21:46 By: Alexander Malmberg <alexm>
-gui is correct here. The rectangle returned from
-cellFrameForTextContainer:... is relative to the current position, and this
will be on the baseline, which implies that it's above the bottom of the line
frag. To get a cell that is as tall as the line frag, you need to place its
origin at the bottom of the line frag. In the example, you want:
return NSMakeRect(0, -p.y, lf.size.width-10, lf.size.height);
Unfortunately, there used to be a bug that would cause an incorrect current
position to be passed, but this is fixed in cvs 2004-09-04. I've also clarified
the NSTextAttachmentCell documentation about this.
-------------------------------------------------------
Date: Tue 07/27/04 at 15:46 By: Yen-Ju Chen <yjchen>
I should say this method is called "repeatly" not "recursively".
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9789>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bugs #9789] - cellFrameForText... in NSTextAttachmentCell is called recursively,
Alexander Malmberg <=