home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!isi.edu!dstrout
- From: dstrout@isi.edu (David Strout)
- Newsgroups: comp.sys.next.programmer
- Subject: Summary: Animating lots of small bitmaps
- Message-ID: <22201@venera.isi.edu>
- Date: 13 Aug 92 12:07:28 GMT
- References: <22171@venera.isi.edu>
- Reply-To: dstrout@darpa.mil (David Strout)
- Distribution: usa
- Organization: Information Sciences Institute, Univ. of So. California
- Lines: 33
-
-
- Well, I got several responses from people (Thank you one and all!).
- For my particular problem(bad flicker when animating a bunch of
- bitmaps, each in a subview, in a large main view), turns out the the
- flashing was due to the way I was erasing my bitmaps before
- re-drawing.
- I was doing it like this:
-
- - drawSelf:(NXRect *)rects :(int)rectCount
- {
-
- PSsetgray(0);
- NXRectFill(rects);
-
- [self moveBy: 7 :0];
-
- [ship composite:NX_SOVER toPoint:&bounds.origin];
-
- return self;
- }
-
- where ship is an NXImage. When I replaced the PSsetgray and
- NXRectFill calls with [backGround composite:NX_SOVER
- toPoint:&bounds.origin] where backGround is an NXImage the same size
- as ship, initialized to the background, the flicker went away. Better
- examples of this are in BackSpace, by Sam Streeper, and PacMan, by Don
- Yacktman.
-
- Thanks again for the helpful suggestions.
-
- dave.
-
-
-