Re: NSColor opacity
Re: NSColor opacity
- Subject: Re: NSColor opacity
- From: Andreas Mayer <email@hidden>
- Date: Tue, 30 Jan 2007 08:36:22 +0100
Am 30.01.2007 um 08:13 Uhr schrieb Ken Tozier:
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));
NSRectFillUsingOperation(rect, NSCompositeSourceOver);
Andreas
_______________________________________________
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