• 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: Insetting a complex NSBezierPath shape?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Insetting a complex NSBezierPath shape?


  • Subject: Re: Insetting a complex NSBezierPath shape?
  • From: Nicko van Someren <email@hidden>
  • Date: Thu, 31 Mar 2005 11:40:24 +0100

On 31 Mar 2005, at 01:09, Keith Blount wrote:

Is there an easy way to inset a complex NSBezierPath
shape? I am custom drawing an a background shape to
some text in a text view,  and to do this the shape I
create can be quite complex (eg. selected text across
a few lines with rounded edges).
...
If anyone could offer any advice on how to do this
with a complex NSBezierPath shape (it's easy with a
rectangle or circle), I would be very grateful.

There is no generalised way to do this. Consider trying to inset a figure of eight.


Given the shape you describe above for your text highlight, I would just split out the code you currently use for making this path and produce a version which moves all the line segments in one point, reducing the radius of convex corners by a point and increasing the radius of the concave corners by the same.

	Nicko

_______________________________________________
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


References: 
 >Insetting a complex NSBezierPath shape? (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: Adding custom NSView to cell in NSTableView
  • Next by Date: Re: handle kill of foundation tool
  • Previous by thread: Re: More Newbie Trouble with Basic Bindings
  • Next by thread: Re: Insetting a complex NSBezierPath shape?
  • Index(es):
    • Date
    • Thread