• 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
Re: Drawing Invalidation Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing Invalidation Question


  • Subject: Re: Drawing Invalidation Question
  • From: Michael Ash <email@hidden>
  • Date: Sun, 1 Feb 2009 23:41:18 -0500

On Sun, Feb 1, 2009 at 4:05 PM, Seth Willits <email@hidden> wrote:
> On Feb 1, 2009, at 3:07 AM, Graham Cox wrote:
>
>> As others have mentioned, there is potentially a huge difference. If you
>> invalidate a lot of small rectangles, the update region might be quite
>> complex in shape; the <rect> passed in -drawRect: is only the bounds of this
>> complex area.
>
> Which is why the docs confused me. I knew there were subrectangles, but the
> weird thing was this line in the docs:
> "It is optimized to efficiently reject any rectangle that lies outside the
> bounding box of the area the receiver is being asked to draw in drawRect:."
>
> So it's not optimized to reject anything outside of the sub-rectangles? This
> sentence really threw me off. In retrospect and I can see that it simply
> means that it's doing a simple check up front like below, but it's a rather
> poorly worded description as it doesn't mention the sub-rectangles at all.
> Documentation fail. ;-)

You left out the word "efficiently" from the formulation of your
contrapositive, which I think is important. To me, the words
"optimized" and "efficiently" make it clear that it's only describing
a speed enhancement, and telling you that there's no need to do your
own bounding-rect culling beforehand. The full behavior of the method
is described at the top of the documentation.

Of course documentation quality and clarity is a matter of opinion,
and may vary.

Mike
_______________________________________________

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

References: 
 >Re: Drawing Invalidation Question (From: Graham Cox <email@hidden>)
 >Re: Drawing Invalidation Question (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: maximum theoretical speedup with dual quad processors
  • Next by Date: Re: Can we render QCRenderer in CAOpenGLLayer..?
  • Previous by thread: Re: Drawing Invalidation Question
  • Next by thread: Re: +[NSColor highlightColor] returns white instead of actual color
  • Index(es):
    • Date
    • Thread