[comp.sys.mac.programmer] off-screen drawing

fadushin@rodan.acs.syr.edu (Fred Dushin) (05/13/91)

I am interested in doing some off-screen drawing, but I am 
confused as to how to do it.  One way would be, I guess, to
build two windows of the same size, draw on one while the
other is displayed, then switch them, but that seems
like it would take up time (with the window manager, right?)

Another way (Inside Mac I; ch6) is to open a new grafport and
use copyBits to switch the bitmaps.  I guess that would be
less intensive computationally.

My question is, do I use OpenPort(...) to create a new
grafport in which to do the drawing?  And, if I do, do I have
to use NewPtr(...) beforehand to allocate space for a pointer
to the grafport?

This is for the purposes of animation.  Are there any "skeleton"
algorithms out there for off-screen drawing that use this second
method?

Thanks,

Fred Dushin                     Syracuse University, Syracuse, NY
Internet:                       Bitnet:
fadushin@rodan.acs.syr.edu      fadushin@sunrise.bitnet