Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string attributes and lineheight



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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.