NSQuickDrawView opacity troubles
NSQuickDrawView opacity troubles
- Subject: NSQuickDrawView opacity troubles
- From: Chris Silverberg <email@hidden>
- Date: Mon, 5 Apr 2004 11:40:05 -0700
Hello everyone,
I have an NSQuickDrawView that uses CopyBits to draw from an offscreen
GWorld. My view does this frequently, so performance is important.
Since my drawRect function fills the entire frame of the view, the
simplest performance gain should come from making my view opaque:
- (BOOL)isOpaque { return YES; }
The only problem is, this doesn't seem to work for an NSQuickDrawView.
The view draws once, but then no more. Actually, my view thinks it's
drawing... it repeatedly receive a notification and calls [self
display]. My drawRect function is called as expected... but the
drawing simply doesn't result in anything being drawn to screen.
Somehow making an NSQuickDrawView opaque messes it up.
This is definitely a performance problem. By calling [self display], I
am causing the parent view to be unnecessarily drawn each time. I've
tried alternatives to isOpaque.... displayIfNeededIgnoringOpacity and
displayRectIgnoringOpacity, both resulting in the same broken behavior.
Has anyone run into this and come across a solution?
Is there a more efficient way to draw a GWorld into a view other than
NSQuickDrawView?
thanks,
Chris
_______________________________________________
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.