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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to