[comp.sys.mac.programmer] Fast scrolling of pictures?

frits@cs.washington.edu (Johan Habermann) (08/17/90)

I am currently working on a program that needs to scroll a picture that is 
about twice the size of the screen (Mac SE). I currently am using ScrollBits
and InvalRgn, but it is too slow. Can someone point me to some example code,
or explain a method that is as fast as possible?

thanks much

Frits Habermann (frits@june.cs.washington.edu)

stevec@Apple.COM (Steve Christensen) (08/17/90)

In article <12804@june.cs.washington.edu> frits@cs.washington.edu (Johan Habermann) writes:
>
>I am currently working on a program that needs to scroll a picture that is 
>about twice the size of the screen (Mac SE). I currently am using ScrollBits
>and InvalRgn, but it is too slow. Can someone point me to some example code,
>or explain a method that is as fast as possible?

How about calling ScrollBits and then call the drawing routine directly.
If the picture is a bitmap, you can then just blast out the new section
with CopyBits, using the update rectangle to specify the section of the
picture to draw.  If the drawing is done on the fly, you can set the
window's clipRgn to be the same as the area to be updated, and then run
thru the items to be drawn (possibly even checking for intersection with
the update area)...

steve

-- 
____________________________________________________________________

  Steve Christensen             Internet:   stevec@goofy.apple.com
  Apple Computer, Inc.          AppleLink:  STEVEC
  20525 Mariani Ave, MS 81-CS   CompuServe: 76174,1712
  Cupertino, CA  95014

  "You just contradicted me."  "No I didn't."
____________________________________________________________________