Re: text to bezier path
Re: text to bezier path
- Subject: Re: text to bezier path
- From: Douglas Davidson <email@hidden>
- Date: Mon, 4 Jun 2007 13:08:41 -0700
On Jun 4, 2007, at 12:45 PM, Chase wrote:
I'm trying to draw text with outline of a user-specified thickness
(in pixels). I had to do something similar in a REALbasic app
once, and the effect was achieved by drawing once with a stroke
thickness twice that of the user-specified "text outline thickness"
and then drawing the original text again, directly over the top
(with no outline this time).
It's not clear to me exactly what kind of effect you want, but with
simple attributes you can specify independent stroke and fill colors
as well as the stroke width. Use NSForegroundColorAttributeName,
NSStrokeColorAttributeName, and NSStrokeWidthAttributeName. The
stroke width is not in pixels, but is relative to the font size, so
you would need to set it in your text on a per-font-size basis. See
the comments in AppKit/NSAttributedString.h for the exact
interpretation of the values.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden