colorWithAlphaComponent: weirdness
colorWithAlphaComponent: weirdness
- Subject: colorWithAlphaComponent: weirdness
- From: Finlay Dobbie <email@hidden>
- Date: Mon, 29 Sep 2003 20:14:20 +0100
I've come across some weird behaviour with drawing colors which have an
alpha component.
In your custom view subclass, do something like this:
- (void)drawRect:(NSRect)rect {
[[[NSColor blueColor] colorWithAlphaComponent:0.5] set];
NSRectFill(rect);
}
Now run your application. It looks fine. Then, click the minimize
button. Uh, wtf? Why did that window suddenly get a translucent hole in
it?
A project demonstrating this can be found at
<
http://z.dobbie.net/ViewWeirdness.tar.gz>. Just run it and then
minimize the window. You'll see the WeirdView suddenly change for no
apparent reason, then when you deminimize it you'll see it flick back
again when the animation finishes.
Can anybody shed any insight onto this?
-- Finlay
_______________________________________________
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.