• 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
Re: string attributes and lineheight
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string attributes and lineheight


  • Subject: Re: string attributes and lineheight
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 28 Jun 2004 09:10:17 -0700

On Jun 26, 2004, at 7:23 AM, Koen van der Drift wrote:

But that didn't give the expected result. Is there I way I can adjust the lineheight for the backgroundcolor attribute?

The background color is intentionally drawn so as to be continuous between lines. If you want some other behavior, I would suggest subclassing NSLayoutManager and overriding drawBackgroundForGlyphRange:atPoint:. You probably will want to call the super method and then do your own drawing in addition, using rectArrayForCharacterRange:withinSelectecCharacterRange: inTextContainer:rectCount: to retrieve an array of rects which you may then modify and fill as you please.

Douglas Davidson
_______________________________________________
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.


References: 
 >string attributes and lineheight (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Overlay window & keydown
  • Next by Date: Tab View Delegate
  • Previous by thread: string attributes and lineheight
  • Next by thread: my app crashes MallocDebug
  • Index(es):
    • Date
    • Thread