transparent backgrounds and artifacting
transparent backgrounds and artifacting
- Subject: transparent backgrounds and artifacting
- From: "Marc Wan" <email@hidden>
- Date: Wed, 11 Jul 2007 10:39:45 +0800
Hello!
I have an NSWindow holding a scrollview. The window has setOpaque:
NO, and the scrollview's content view sets its background to a
slightly transparent black (0,0,0,0.9).
Now, the problem is: when I draw into the content view and then
scroll around, there is "artifacting" on the black background.
(http://chipmunkninja.com/download/artgaps.png). Interestingy enough,
as soon as I click on another window, or activate another application,
the background is redrawn without the artifacting.
Even worse, when I draw images with transparency, they 'override'
the black background, and create huge gaping holes in my window which
I don't really want. (see same picture). Using CIImages or NSImages
doesn't seem to make any difference.
If I tell the window to draw fully opaque (setOpaque: YES), all
these problems go away. Except I really like the smoked black
semi-transparent background.
So, any tips on how I can set up a window with a semi-transparent
background, but not have these wacky problems? I've tried various
combinations of setting the Window background colour (always ignored
since the scrollview and/or contentview draw), NSScrollView draws vs
doesn't draw background, and just NSRectFill in the content view's
drawRect: method. Always the exact same two problems.
thanks,
marc.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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