Re: NSGradient draws incorrectly in PDF context?
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