Re: NSColor opacity
Re: NSColor opacity
- Subject: Re: NSColor opacity
- From: Uli Kusterer <email@hidden>
- Date: Sun, 25 Feb 2007 22:01:46 +0100
Am 30.01.2007 um 05:53 schrieb Ken Tozier:
NSRectFill([self bounds]);
That's your error. In 99% of the cases where I see people using
NSRectFill(), it's a mistake. NSRectFill() is for "erasing". I.e. it
actually assigns exactly the color you specify to the back buffer. If
your window is opaque (no setOpaque:NO) that means it gets black.
What you want is
[NSBezierPath fillRect: [self bounds]];
That will composite the colour into what's already in the window.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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