• 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: NSGradient draws incorrectly in PDF context?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSGradient draws incorrectly in PDF context?


  • Subject: Re: NSGradient draws incorrectly in PDF context?
  • From: Graham Cox <email@hidden>
  • Date: Fri, 13 Mar 2009 10:57:07 +1100


On 13/03/2009, at 3:00 AM, Benjamin Stiglitz wrote:

I've noticed I'm getting different results with NSGradient when drawing
to screen and when drawing in a PDF context, e.g. printing, or write PDF
to clipboard. If the gradient contains colours with transparency, it
draws correctly on-screen (allowing what's drawn behind to come through),
but draws opaquely in PDF.

PDF doesn’t support alpha in gradient colors. You’ll need to render out
to a bitmap and then draw that instead. For best results you want a high
resolution image that is dithered to prevent banding that the PDF
rendering engine might otherwise do on its own.


-Ben


Wow. That sucks... is that likely to be changed any time soon? This "workaround" is pretty hardcore.

--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


  • Follow-Ups:
    • Re: NSGradient draws incorrectly in PDF context?
      • From: Kyle Sluder <email@hidden>
References: 
 >NSGradient draws incorrectly in PDF context? (From: Graham Cox <email@hidden>)
 >Re: NSGradient draws incorrectly in PDF context? (From: Benjamin Stiglitz <email@hidden>)

  • Prev by Date: Re: code for drawing an NSTextField to a panel window ...
  • Next by Date: Re: code for drawing an NSTextField to a panel window ...
  • Previous by thread: Re: NSGradient draws incorrectly in PDF context?
  • Next by thread: Re: NSGradient draws incorrectly in PDF context?
  • Index(es):
    • Date
    • Thread