Re: Quickly Moving Views
Re: Quickly Moving Views
- Subject: Re: Quickly Moving Views
- From: John Randolph <email@hidden>
- Date: Wed, 16 Jul 2003 13:46:30 -0700
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.