Re: underlining
Re: underlining
- Subject: Re: underlining
- From: Eric Slosser <email@hidden>
- Date: Tue, 10 Feb 2009 11:55:12 -0500
On Feb 6, 2009, at 1:08 PM, Eric Slosser wrote:
I figured out (thanks to Jeff Lynch) that it's not horribly wrong,
it's just that the baseline of the underline is too high. The break
in the underline is there because NSLayoutManager doesn't draw on
top of the descender of the 'p'.
So why is the baseline wrong? Does NSLayoutManager's
drawGlyphsForGlyphRange:atPoint need me to setup the NSView's
graphics context differently?
Douglas Davidson supplied the clue. I needed to add the following
line to MyView.mm:
- (BOOL) isFlipped { return YES; }
Now the underline in my simple test app is right. I'm sure the answer
to my real problem is going to be "don't use NSLayoutManager in a non-
NSView environment".
_______________________________________________
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