• 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: Quickly Moving Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

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

  • Prev by Date: Quickly Moving Views
  • Next by Date: Re: Where is Lynx?
  • Previous by thread: Quickly Moving Views
  • Next by thread: Version number of apps
  • Index(es):
    • Date
    • Thread