Re: underlining for misspelled words draws in the wrong place
Re: underlining for misspelled words draws in the wrong place
- Subject: Re: underlining for misspelled words draws in the wrong place
- From: Robert Clair <email@hidden>
- Date: Thu, 24 Feb 2005 14:17:57 -0500
I use -[NSLayoutManager drawGlyphsForGlyphRange:atPoint:] with a
transformed
coordinate system to display arbitrarily scaled, rotated and
positioned text. The problem
is: the text is transformed as I expect, but the underlining isn't.
It resolutely appears where
the text would be if I drew it without the transforms.
The spelling underline is drawn using a pattern, so it's not going to
draw properly in an arbitrary coordinate system. It's designed to
work with an arbitrary (non-rotated) NSTextView, but not with more
general views. That's one reason why it's private and used only by
NSTextView.
Douglas -
Thanks for the quick answer.
But does it have to be this way ? Why should this be private? People
entering rotated
text make spelling mistakes, too. I fully understand that drawing with
a pattern color
is very much faster than fonting a line. But considering the small
amount of drawing (unless
you are a *really* bad typist), does it make that much difference in
actual practice ?
Or as an alternative, why not just look at the matrix to see if the
view is rotated and then
draw the line with the pattern color or fonted as appropriate ?
For the moment I'm just grabbing the context menu and removing the
"Check Spelling as You
Type" option until I get a chance to implement my own drawing of the
lines.
....Bob Clair
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden