Re: Transparency?
Re: Transparency?
- Subject: Re: Transparency?
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 21 Apr 2004 16:10:01 +0100
I don't know about Installer, but have a look inside the Airport Setup
Assistant package, and check out the image background.tif. The giant
icon and the translucent rectangle are all one big semi-transparent
image. Then, if you open the nib file, it looks as if a fully
transparent text view is added programmatically to a custom view laid
over a box (which presumably will contain that background image).
This doesn't seem like an ideal way to accomplish the effect, and I
know Installer does it differently, but how is a mystery to me. Examine
the Installer nib for clues.
Regards,
Jeremy.
On 21 Apr 2004, at 3:19 pm, Huyler, Christopher M wrote:
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.
_______________________________________________
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.
References: | |
| >Transparency? (From: "Huyler, Christopher M" <email@hidden>) |