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

Transparency?


  • Subject: Transparency?
  • From: "Huyler, Christopher M" <email@hidden>
  • Date: Wed, 21 Apr 2004 10:19:33 -0400
  • Thread-topic: Transparency?

The Installer.app program has a cool looking transparency effect where
it has a slightly transparent white box, then the background image, then
finally the striped background of the window. How do I do this in
cocoa?

I started by sub-classing an NSBox and rewriting the drawRect function:

- (void) drawRect:(NSRect) frame
{
NSRect rect=[self frame];
[super drawRect:frame];
rect.origin=NSMakePoint(1,1);
rect.size.width-=2;
rect.size.height-=2;

[[NSColor colorWithCalibratedWhite:1.0 alpha:0.9] set ];
NSRectFill(rect);
}

However, the box does not end up being transparent. Instead it is just
off-white. Can someone point me in the right direction?

--
Christopher Huyler
Computer Associates Intl.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Transparency?
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Transparency?
      • From: Jeremy Dronfield <email@hidden>
  • Prev by Date: Re: Change Highlight in NSTableView
  • Next by Date: RE: Transparency?
  • Previous by thread: Re: Change Highlight in NSTableView
  • Next by thread: Re: Transparency?
  • Index(es):
    • Date
    • Thread