• 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
Printing a range of text in a particular container --
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing a range of text in a particular container --


  • Subject: Printing a range of text in a particular container --
  • From: John Velman <email@hidden>
  • Date: Sun, 28 Dec 2008 17:06:27 -0800

If I have a particular range of glyphs that I want to put in,
say,textContainer1, and a different (as it happens, contiguous) range I
want to put in textContainer2, is there a way to do it?

I've tried

    [layoutManager drawGlyphsForGlyphRange: glyphRangeStringOne atPoint:startPoint];

    [layoutManager drawGlyphsForGlyphRange:glyphRangeStringTwo  atPoint:startPoint2];

Here the first range of glyphs takes up "almost all" of the first
container.   The second range of glyphs seems to start in the position of
(relative to the top left corner (isFlipped) of the second container) that
it would have occupied in the first container if it had been drawn there,
then continues from the top of the second container.


What I would like, is to "end" drawing in textContainer1 after the first
'drawGlyphs..', and have the second 'drawGlyphs...'  start out in the
textContainer2.  I can't see a way to do this using only one NSTextStorage
instance....

>From what I can tell, it would seem to require two NSTextStorage instances
with corresponding layout managers and textContainers.  It seems I'm
missing something.


I need a method that works with 10.4, by the way.

Best,

John Velman

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Printing a range of text in a particular container --
      • From: Martin Wierschin <email@hidden>
  • Prev by Date: Re: How do I include a URL in a preprocessed Info.plist?
  • Next by Date: Re: should it crash?
  • Previous by thread: Re: Custom NSDictionaryController object class
  • Next by thread: Re: Printing a range of text in a particular container --
  • Index(es):
    • Date
    • Thread