Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: Advice on icon animation wanted Message-ID: <47454@apple.Apple.COM> Date: 18 Dec 90 01:59:07 GMT References: <47444@apple.Apple.COM> <1119@babcock.cerc.wvu.wvnet.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 37 vrm@babcock.cerc.wvu.wvnet.edu (Vasile R. Montan) writes: >From article <47444@apple.Apple.COM>, by stevec@Apple.COM (Steve Christensen): >> In article <1116@babcock.cerc.wvu.wvnet.edu> un020070@vaxa.wvnet.edu writes: > >[Deleted material in which I talk about plotting icons during the >vertical retrace interrupt] >> You also can't draw from an interrupt routine because the heap may not be >> consistent, and QuickDraw uses the Memory Manager for regions. >Really? One book that I saw (but don't own- I think it's called >Mac Programming Secrets) suggesting doing drawing during the VBL >to accomplish flicker-free animation. Did the interrupt routine >somehow signal the main program that the VBL was going on? Well, you could probably do drawing during interrupt routines assuming you didn't use QuickDraw, and that any required heap space was locked before you used it. Inside Mac II, pp. 211-213 lists routines that may move memory, and probably all of QuickDraw's drawing routines are represented (vol V, pp601-602 adds the color routines). >>>Second question: How do you draw an icon in XOR? Is this possible >>>with the easy-to-use PlotIcon, or do I have to mess with some kind >>>of bit transfer? >>Well, you should just be able to set the transfer mode to XOR and do the plot. >I tried this, and it didn't seem to work. I couldn't get the transfer >mode to affect PlotIcon at all, which was why I wondered if there might >not be some special considerations. I haven't looked at the PlotIcon code myself, but it could be forcing the drawing mode to srcCopy before drawing the icon. It may just be that the way to do it is to call CopyBits and specify srcXor. steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Steve Christensen | Apple Computer, Inc. | Disclaimer: | 20525 Mariani Ave, MS-81CS | the above may be stevec@apple.com | Cupertino, CA 95014 | a lie...or not.