Re: NSForegroundColorAttributeName + NSStrokeWidthAttributeName
Re: NSForegroundColorAttributeName + NSStrokeWidthAttributeName
- Subject: Re: NSForegroundColorAttributeName + NSStrokeWidthAttributeName
- From: Lorenzo <email@hidden>
- Date: Wed, 06 Jun 2007 03:16:27 +0200
Thanks Douglas. It worked.
I was looking for some doc close to the NSStrokeWidthAttributeName constant
and strangely there was no explanation... I think that place should be the
most obvious place to put that info.
Anyway, another strange issue,
if I add a shadow to the stroked string, I get:
Part of the shadow goes onto the background, as usual. Correct.
Part of the shadow goes onto the text filled area.
It looks like the stroke projects shadow over the text itself. Which is a
nice effect, but not as default, I presume.
The text area should be considered as an unique surface, projecting a shadow
onto the background only. Please consider that as my personal opinion.
Last, the statement
[myMutableAttributedString size];
returns the size of the string without the stroke. So I get a cutted area.
It's not a serious problem, but I think someone has to fix it.
Thanks for the trick. Ciao.
Best Regards
--
Lorenzo
email: email@hidden
>
> From: Douglas Davidson <email@hidden>
> Date: Tue, 05 Jun 2007 16:58:00 -0700
> To: Lorenzo <email@hidden>
> Cc: email@hidden
> Subject: Re: NSForegroundColorAttributeName + NSStrokeWidthAttributeName
>
> On Jun 5, 2007, at 4:52 PM, Lorenzo wrote:
>
>
>> when I set the NSStrokeWidthAttributeName to my string, I lose the
>>
>>
>> NSForegroundColorAttributeName attribute. So I see a transparent string with
>>
>>
>> a white stroke line. Strangely instead, the NSBackgroundColorAttributeName
>>
>>
>> works well. Do I forget something?
>>
>>
> Read the comments in AppKit/NSAttributedString.h.
> NSForegroundColorAttributeName is used as the fill color. The absolute value
> of the stroke width attribute determines the stroke width, and the sign
> determines the drawing mode: stroke alone for positive values of the
> attribute, stroke and fill for negative values, fill only for zero or no
> attribute.
>
> 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