• 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: display optimization / display rectangles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display optimization / display rectangles


  • Subject: Re: display optimization / display rectangles
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 14 May 2009 11:18:39 -0700

On May 14, 2009, at 10:09, David Harper wrote:

In my document view class' drawRect: method, everything in the document overlapping the display rectangle is drawn. However, my pages are drawn as rectangular bezier paths with attached NSShadows, so I draw an entire page if it overlaps the display rectangle. The problem is that even though calling [pagePath fill] does not actually cause the document view to actually draw the entire contents of the fill (but rather what overlaps the display rectangle, as expected), subviews outside the display rectangle that overlap the page rectangle are recursively displayed in their entirety.

Can you expand on this issue a little? If pagePath is a NSBezierPath, filling the path shouldn't itself cause anything else to be drawn, so your drawing code is not likely to be the cause of the unwanted extra drawing.


Assuming you're doing nothing to violate the paradigm that drawing occurs only in response to setNeedsDisplay/setNeedsDisplayInRect, then the problem is likely that you're somehow invoking setNeedsDisplay... on too many things.

You aren't by any chance calling setNeedsDisplay... from within a drawRect: method, are you? That would be a Really Bad Thing to do.


_______________________________________________

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: 
 >display optimization / display rectangles (From: David Harper <email@hidden>)

  • Prev by Date: Re: [Newbie] Binding an NSArrayController with/without NSObjectController
  • Next by Date: Re: [Newbie] Binding an NSArrayController with/without NSObjectController
  • Previous by thread: display optimization / display rectangles
  • Next by thread: Re: display optimization / display rectangles
  • Index(es):
    • Date
    • Thread