Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Marquee Help? Message-ID: <6059@internal.Apple.COM> Date: 8 Jan 90 21:01:37 GMT References: <18304@dartvax.Dartmouth.EDU> <2495@odin.SGI.COM> Organization: Apple Computer, Inc. Lines: 23 > PenMode(patXor); /* I'm not sure this is either the correct If you are doing this in a bitmap, then you should use patCopy. patXOR might look better in a structured graphics program, where there is always a lot of white space. (If you use patCopy then to erase the marquee you have to redraw the contents of the rectangle.0 > PenPat(patterns[patNum++]); > patNum &= 3; > FrameRect(pRect); /* Draw a rectangle */ > while (TickCount() - t < 4) /* Wait a bit */ Another way to do this is to choose the pattern based on the value of TickCount % 4 (or TickCount % 8 if you use 8 patterns). The advantage is that the ants will move at the same speed regardless of the size of the rectangle. The disadvantage is that you may get jerky motion if your loop can't keep up. -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 46-B Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr