Re: NSGradient draws incorrectly in PDF context?
Re: NSGradient draws incorrectly in PDF context?
- Subject: Re: NSGradient draws incorrectly in PDF context?
- From: Benjamin Stiglitz <email@hidden>
- Date: Thu, 12 Mar 2009 12:00:52 -0400
- Mail-followup-to: Graham Cox <email@hidden>, Cocoa-Dev List <email@hidden>
> 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
_______________________________________________
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