NSQuickDrawView opacity troubles (solved)
NSQuickDrawView opacity troubles (solved)
- Subject: NSQuickDrawView opacity troubles (solved)
- From: Chris Silverberg <email@hidden>
- Date: Mon, 5 Apr 2004 12:01:20 -0700
Hi everyone,
I solved my problem. The solution was simple, and it might help
others. So for the archives...
If you are using NSQuickDrawView and do not need transparency, you can
gain efficiency by making your view opaque by implementing isOpaque:
- (BOOL)isOpaque { return YES; }
However, if you do this, you *must* flush the quickdraw port when you
draw. For example:
- (void)drawRect:(NSRect)rect
{
/* do some quickdraw stuff here */
QDFlushPortBuffer([self qdPort], NULL); /* you MUST do this if this
view is opaque */
}
Failing to call QDFlushPortBuffer will result in improper drawing,
especially if the view is updating frequently. I hope this helps
others as well.
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.