• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSShadowAttributeName doesn't scale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSShadowAttributeName doesn't scale


  • Subject: Re: NSShadowAttributeName doesn't scale
  • From: Graham Cox <email@hidden>
  • Date: Tue, 03 Dec 2013 12:20:47 +0100

On 3 Dec 2013, at 12:05 pm, Leonardo <email@hidden> wrote:

> But of course I can¹t
> expect other apps do the same job when I paste the text.

No indeed. The problem lies with Apple’s decision to let shadows ignore the CTM. You need to file a radar with an enhancement request. It’ll be a dupe.

Alternatively, since you are able to grab the change in scale and update your shadow, you could just use those numbers to assign a standard shadow. Instead of storing your shadow values in a shadow subclass, you could add a custom attribute to the text (attributes are just a dictionary, you can add any keys you want of your own as long as they can’t be mistaken for a standard one) and use it to manipulate the standard shadows, which will then be pasteable in another app.

> Yes, I scale the blur too, but as I can see, it should not scale *linearly*
> with the scaleFactor. I am still looking for a better function.

I believe it should scale linearly. It’s a *radius*, so it is related to the geometry of the context. What you may be seeing is that for very small radii drawn at a small scale, there are very few pixels to spread the blur across, so it’s not being anti-aliased very well. As you zoom in, there are more pixels available so the blur becomes more accurate. And much slower ;-)

—Graham
_______________________________________________

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


  • Prev by Date: Re: NSShadowAttributeName doesn't scale
  • Next by Date: Core Animation warning?
  • Previous by thread: Re: NSShadowAttributeName doesn't scale
  • Next by thread: Core Animation warning?
  • Index(es):
    • Date
    • Thread