Re: NSAttributedString attribues misbehaving
Re: NSAttributedString attribues misbehaving
- Subject: Re: NSAttributedString attribues misbehaving
- From: Douglas Davidson <email@hidden>
- Date: Tue, 23 Nov 2004 09:06:02 -0800
On Nov 23, 2004, at 5:06 AM, Robert Clair wrote:
I set the text color by setting NSForegroundColorAttributeName in an
attributes dictionary and calling [NSTextView setTypingAttibutes:].
OK so far, works as expected. But then I also set
NSStrokeColorAttributeName
and NSStrokeWidthAttributeName to outline the text in a contrasting
color.
I get my outline... but the fill disappears.
The value of NSStrokeWidthAttributeName controls this. It should be a
float-valued NSNumber, of which the absolute value controls the stroke
width, and the sign controls the drawing mode; a positive value causes
drawing using stroke alone, a negative value causes stroke and fill
drawing, and zero (or no value) causes fill only. If
NSForegroundColorAttributeName is present, it is used as the fill color
(if fill is drawn); if it is absent, the fill color is black (if fill
is drawn). If NSStrokeColorAttributeName is present, it is the color
used for the stroke (if stroke is drawn); if it is absent, the fill
color is also used for the stroke (if stroke is drawn). See
<AppKit/NSAttributedString.h>.
Douglas Davidson
_______________________________________________
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