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

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

  • Prev by Date: Re: GC Seems To Never Kick In
  • Next by Date: Copy of NSDictionary is cleared when the original is cleared. Why?
  • Previous by thread: NSGradient draws incorrectly in PDF context?
  • Next by thread: Re: NSGradient draws incorrectly in PDF context?
  • Index(es):
    • Date
    • Thread