• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSQuickDrawView opacity troubles (solved)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSQuickDrawView opacity troubles (solved)
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: Re: Itunes structure
  • Next by Date: Re: A question about text
  • Previous by thread: Re: A question about text
  • Next by thread: Re: NSQuickDrawView opacity troubles (solved)
  • Index(es):
    • Date
    • Thread