Insetting a complex NSBezierPath shape?
Insetting a complex NSBezierPath shape?
- Subject: Insetting a complex NSBezierPath shape?
- From: Keith Blount <email@hidden>
- Date: Wed, 30 Mar 2005 16:09:03 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hello,
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). So, I create the
shape using an NSBezierPath which I then fill. That
works well, but I also want a 1 pixel outline to the
shape. If I just stroke the shape with a 1 pixel line
width, antialiasing means that the outline is blured
and looks bad. What I really want to do is inset the
whole shape, in the same way that I could inset a rect
using NSInsetRect(rect,1.0,1.0), so that I can then
just fill in the inner shape with a different colour -
insetting a shape by 1 pixel like this seems to be the
only way to get a really crisp one pixel outline (or
is there a better way I am missing?).
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.
Many thanks,
Keith
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
_______________________________________________
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