jmm@thoth9.berkeley.edu.BERKELEY.EDU (10/06/87)
I'm having a problem using an offscreen bitmap. (I'm working in LSP). 1. Set up bitmap record, allocate enough memory for bitmap. 2. Open a new window. 3. Use SetPortBits to set the new window's bitmap to the bitmap I set up in #1. Save the old bitmap. 4. Draw stuff. 5. Reset the window's bitmap to the original. 6. Use CopyBits to transfer the offscreen bitmap to the current window. 7. This gets me zippo. What is staring me in the face? I've read IM's section on Quickdraw about seven hundred times :~) but I can't find anything wrong. I reset the cliprect to the window size every time I change bitmaps, and absolutely nothing comes out of the CopyBits calls. (I know there's a Technote about this - I'm trying to get my hands on it, but I don't have it yet. If someone could send me a plain textfile, with no Mac formatting, I'd much appreciate it. I have no way of getting files from Unix to my mac.) Thanks, James Moore ucbvax!leggatt!jmm
tedj@hpcilzb.HP.COM (Ted Johnson) (10/17/87)
Look in the July 1987 issue of MacTutor. There is an excellent article which demonstrates how to use offscreen bitmaps on p.67 ("Pascal Procedures, Animated BitMaps"--Scott Boyd). It is written in MPW Pascal, and seems pretty straightforward (I am in the process of translating it to LightSpeed C). Good luck! -Ted ******************************************************* Ted C. Johnson Hewlett-Packard, Design Technology Center Santa Clara, CA (408)553-3555 UUCP: ...hplabs!hpcea!hpcid!tedj *******************************************************