• 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: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
      • From: Jonathon Mah <email@hidden>
References: 
 >Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...) (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: OT : Is the Jaguar user base large enough to still support it?
  • Next by Date: Simple question about NSTableView grid...
  • Previous by thread: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
  • Next by thread: Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
  • Index(es):
    • Date
    • Thread