Re: Very small rect in drawRect:
Re: Very small rect in drawRect:
- Subject: Re: Very small rect in drawRect:
- From: Jens Alfke <email@hidden>
- Date: Sat, 28 Sep 2013 11:40:04 -0700
On Sep 27, 2013, at 11:53 PM, Gerriet M. Denkmann <email@hidden> wrote:
> But it does not make sense, and it might be a symptom of some problem.
With all due respect, it doesn’t make sense to you because you don’t know the inside details of how view display works in AppKit. (I don’t either; there are probably only a couple of people who do, and they work or worked on AppKit.) I did once work on view display in the AWT framework in Java, and I can say that in general it’s a lot more complex than you’d think. And AWT was really primitive compared to NSView. So second-guessing it probably isn’t a good idea.
All your code needs to worry about is deciding what to draw and not draw based on the rect. If you have something that’s expensive to compute, check whether it’s in the area to be redrawn before doing the computations.
—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