• 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: NSColor opacity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSColor opacity (From: Ken Tozier <email@hidden>)
 >Re: NSColor opacity (From: "I. Savant" <email@hidden>)
 >Re: NSColor opacity (From: Ken Tozier <email@hidden>)
 >Re: NSColor opacity (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: NSColor opacity
  • Next by Date: Re: NSColor opacity
  • Previous by thread: Re: NSColor opacity
  • Next by thread: Re: NSColor opacity
  • Index(es):
    • Date
    • Thread