Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
- Subject: Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
- From: Jonathon Mah <email@hidden>
- Date: Thu, 14 Apr 2005 04:57:46 +0930
On 14 Apr 2005, at 03:36, Keith Blount wrote:
Many thanks for your reply and your offer of experimenting with the
code - much appreciated.
I saw the screenshot and was intrigued. :) I "cleaned up" (to me) the
code a bit, added a few comments, and reworked a few things.
This:
Attachment:
BezierTextView.m.zip
Description: Zip archive
correctly handles character ranges that break across two lines (see
line 49), and also the jaggy bit in "Immediately" (third paragraph in
sample text) (see line 147).
I think somewhere along the line I picked up something that made the
top and bottom corners even. But I'm not positive about this.
In the test case, there is a bug where if you change the size of some
text in the middle of a block of bold text, the bubble will be drawn
twice. This is (from what I can see) a result of using
NSFontAttributeName to decide which text to put a bubble around, and if
you use your own attribute it will go away (I think).
So I think that's all the bugs fixed, that I can see. The other thing I
want to do is optimize the setNeedsDisplayInRect:avoidAdditionalLayout:
method, because at the moment it's redrawing the entire text view very
often. To see this, turn on screen updates in Quartz Debug and select a
line in, say, Xcode, then select a line in the bubble app. I'll give
that a shot in a sec.
Jonathon Mah
email@hidden
_______________________________________________
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