Re: Properly using setNeedDisplayInRect
Re: Properly using setNeedDisplayInRect
- Subject: Re: Properly using setNeedDisplayInRect
- From: Jens Alfke <email@hidden>
- Date: Wed, 17 Mar 2010 09:00:35 -0700
On Mar 17, 2010, at 1:50 AM, Gustavo Pizano wrote:
> I was thinking in passing to the setNeeddipslayInRect method the TA rect, but its not clear for me how to just draw the bTa background, becuase in the drawRect Method Im just checking if Im in a TA and then filling the path I created in the mouseDown method.
As a first pass, don’t worry about it. Just leave your -drawRect method alone. You’ll already improve drawing performance because AppKit will clip your drawing to the ‘dirty’ area, so fewer pixels will be rendered and copied to the display.
If you try that and find that performance still isn’t good enough, then you can start optimizing your -drawRect method itself to eliminate unnecessary drawing calls.
—Jens_______________________________________________
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