Re: Insetting a complex NSBezierPath shape?
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