NSShadowAttributeName doesn't scale
NSShadowAttributeName doesn't scale
- Subject: NSShadowAttributeName doesn't scale
- From: Leonardo <email@hidden>
- Date: Sat, 30 Nov 2013 14:54:57 +0100
- Thread-topic: NSShadowAttributeName doesn't scale
Hi, in my NSTextView I have added the NSShadowAttributeName to the selected
text. It works well, I can quite see the shadow "one" pixel under the text,
the blur... Perfect.
But when I zoom in the NSTextView, I see a bigger text but the shadow
doesn't scale with the text. The shadow is still "one" pixel under the text.
Furthermore, if I rotate the NSTextView upsidedown, I still see the shadow
under the text, as the light source was fixed to the default user coordinate
space.
In facts, the NSShadow manual reports:
"rotations, translations and other transformations of the current
transformation matrix (the CTM) do not affect the resulting shadow."
So, how to modify the NSShadowAttributeName accordingly to the view scale?
I guess I have to modify some context's parameter in the NSTextView
drawRect: method. But I don't know how.
Regards
-- Leonardo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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