Subclassing NSTypesetter: fragment/used rects
Subclassing NSTypesetter: fragment/used rects
- Subject: Subclassing NSTypesetter: fragment/used rects
- From: Jérôme Laurens <email@hidden>
- Date: Mon, 30 Sep 2002 09:04:19 +0200
Hi all,
I followed the doc and the advice given on the list by Douglas Davidson
a long time ago. I implemented a poor man typesetter, but I want it to
support the NSTextContainer's fragmentLinePadding. I'am really thinking
that I do not understand the docs...
What I do is in
- (void)layoutGlyphsInLayoutManager:(NSLayoutManager *)layoutManager
startingAtGlyphIndex:(unsigned)startGlyphIndex
maxNumberOfLineFragments:(unsigned)maxNumLines nextGlyphIndex:(unsigned
*)nextGlyph;
[layoutManager setTextContainer: textContainer forGlyphRange:
glyphRange];
usedRect = ?????
fragmentRect = NSMakeRect(0, 0, [texContainer containerSize].width,
fixedLineHeight);
[layoutManager setLineFragmentRect: fragmentRect forGlyphRange:
glyphRange usedRect: usedRect];
aPoint = ????
[layoutManager setLocation: aPoint forStartOfGlyphRange: glyphRange];
I can fill the ???? when there is no line fragment padding and
everything is Ok, but I could not do it when there is
thx
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.