Path: utzoo!attcan!uunet!munnari!murtoa.cs.mu.oz.au!news From: news@cs.mu.oz.au (news) Newsgroups: comp.sys.mac.programmer Subject: Re: Smoothly dragging small pictures Keywords: drag smooth copybits offscreen Message-ID: <1488@murtoa.cs.mu.oz.au> Date: 12 May 89 08:21:31 GMT References: <12492910881010@osu-20.ircc.ohio-state.edu> <1065@umn-d-ub.D.UMN.EDU> Reply-To: jkjl@munmurra.UUCP (John Lim) Organization: University of Melbourne, Comp Sci Dept Lines: 22 From: jkjl@munnari.oz (John Lim) Path: munnari.oz!jkjl Why not simply do do { doCopyBits(); /* from offscreen to screen BitMap */ ticker = TickCount(); while (ticker == TickCount) /* do some background processing */; } while (ContinueCopyBits); The rationale behind it is that the value returned by TickCount() only changes when the screen refreshing task is moving back to the top of the screen and not redrawing the screen. Refer to Knaster's first book (cant remember its title at the moment). The advantage of this method is that you have time to do some background processing, and you don't waste memory in allocating a second offscreen BitMap (which looks like a bit of a kludge to me). john lim