• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Subclassing NSTypesetter: fragment/used rects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Subclassing NSTypesetter: fragment/used rects
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: linking in private non-Framework libraries
  • Next by Date: Re: [newbie] Handling a preferences window
  • Previous by thread: [Q] Activating and deactivating fonts
  • Next by thread: Re: Subclassing NSTypesetter: fragment/used rects
  • Index(es):
    • Date
    • Thread