Re: Transparency Help 2
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