• 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: Transparency Help 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparency Help 2


  • Subject: Re: Transparency Help 2
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 28 Nov 2009 11:20:00 +0100

On 23.11.2009, at 19:01, R T wrote:
> Given: A litho Image, Black & White pixels only.
> I want to show just the Black Pixels in a subclassed NSView.

Use CoreGraphics. The CGxxx APIs let you set a mask on the current graphics context. Essentially you get a CGImage from your NSImage, specify that as a mask for your context, and all white areas will be "clipped away". If you now draw a black rectangle at the yize of your image, you should reproduce the same B/W image you had before, but transparent.

-- Uli Kusterer
Sole Janitor
http://www.the-void-software.com



_______________________________________________

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

References: 
 >Transparency Help 2 (From: R T <email@hidden>)

  • Prev by Date: Re: Apache Module
  • Next by Date: [SOLVED] Re: Sheet comes up disabled on second showing
  • Previous by thread: Re: Transparency Help 2
  • Next by thread: ANN: CamelBones 1.1.0
  • Index(es):
    • Date
    • Thread