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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to