• 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: NSImage Gradient Mask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage Gradient Mask


  • Subject: Re: NSImage Gradient Mask
  • From: George Orthwein <email@hidden>
  • Date: Wed, 24 May 2006 11:28:29 -0400

I think NSCompositePlusDarker is the mode you want with an opaque black to white gradient and assuming a black background.

CompositeLab is helpful but it doesn't take two images or allow you to specify a gradient. Is there an updated version of this somewhere? I suppose it would be easy enough to modify....
/Developer/Examples/AppKit/CompositeLab/


You also may want to have a look at CTGradient to draw the gradient in code:
http://blog.oofn.net/projects/misc


And the ultimate approach would be to apply transparency to the image so that it can float over any type of background. Off the top of my head, you'd probably need to:
- generate a gradient from any opaque color to any transparent color.
- composite with original image as the source using NSCompositeSourceIn


Hope that helps,
George
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSImage Gradient Mask (From: Jerry Brace <email@hidden>)

  • Prev by Date: RE: NSFormatter for hexadecimal numbers
  • Next by Date: Re: What encoding to use to turn NSData from a subprocess into an NSString?
  • Previous by thread: NSImage Gradient Mask
  • Next by thread: disable NSComboBoxCell in tableview
  • Index(es):
    • Date
    • Thread