Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!well!smoke From: smoke@well.sf.ca.us (Nicholas Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Problems with color animation Message-ID: <25759@well.sf.ca.us> Date: 28 Jun 91 16:42:45 GMT References: <17477@darkstar.ucsc.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 36 In article <17477@darkstar.ucsc.edu> anderson@SECS.ucsc.edu writes: [minor epic of woe about CopyBits flicker deleted] > >The size of the bitmap may be a contributing factor. I am using the full >screen for the drawings so my first question is whether or not it is possible >to do the copybits fast enough on this large a bitmap? > >Gary D. Anderson Is your offscreen bitmap at the same pixel depth as your color monitor? If not, you might want to try determining the pixel depth of the screen on which your drawing window appears (via the Device Manager), and then allocating your offscreen image as a *pixMap*, not a bitMap, at that depth. This saves CopyBits from having to resize each pixel dynamically when moving them to the screen. You can test if this is the problem by setting your monitor to black&white before testing your app (assuming that your offscreen bitmap is a bitmap, i. e. is black and white). If the flicker disappears, that's your problem. Some CopyBits calls can take seconds to complete, even when copying a relatively small picture. You'll see the image rippling during these cases. If you don't give it too much work, though, it performs quite well; I routinely do full-window animation with CopyBits (between bitmaps of the same depth and bit-alignment), and never worry about flicker, or tying my job to a vertical interrupt, etc. -- --- * --- Nick Jackiw Smoke@well.sf.ca.us | Jackiw@cs.swarthmore.edu Key Curriculum Press, Inc. Applelink:KEY.EDUSOFT | (415) 548-2304 --- * ---