Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quickly Moving Views



See:

file:///System/Library/Frameworks/AppKit.framework/Versions/C/ Resources/English.lproj/Documentation/Reference/ObjC_classic/Classes/ NSView.html#//apple_ref/doc/uid/20000014/BBCBCCAF


- (void)scrollRect:(NSRect)aRect by:(NSSize)offset
Copies the visible portion of the receivers rendered image within aRect and lays that portion down again at offset from aRects origin. This method is useful during scrolling or translation of the coordinate system to efficiently move as much of the receivers rendered image as possible without requiring it to be redrawn, following these steps:
Invoke scrollRect:by: to copy the rendered image.

Move the view objects origin or scroll it within its superview.

Calculate the newly exposed rectangles and invoke either setNeedsDisplay: or setNeedsDisplayInRect: to draw them.

You should rarely need to use this method, however. The scrollPoint:, scrollRectToVisible:, and autoscroll: methods automatically perform optimized scrolling.


-jcr

John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Quickly Moving Views (From: johness does <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.