Re: NSColor opacity
Re: NSColor opacity
- Subject: Re: NSColor opacity
- From: Dimitri Bouniol <email@hidden>
- Date: Mon, 29 Jan 2007 23:41:16 -0800
That seems pretty complicated for something as simple as this. Did
you try overriding the - (BOOL)isOpaque method in your view?
On Jan 29, 2007, at 11:13 PM, Ken Tozier wrote:
Well I figured out how to do the transparency thing using CGxxx
functions. Here's the solution for anyone else who might be
interested
NSRect rect = [self bounds];
CGContextRef context = [[NSGraphicsContext currentContext]
graphicsPort];
CGContextSetRGBFillColor (context, 0,1,0, .2);
CGContextFillRect (context, CGRectMake (0, 0, rect.size.width,
rect.size.height));
This draws a 20% green screen over the entire bounds rect;
--
Dimitri Bouniol
email@hidden
http://web.mac.com/dimitri008/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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