Article View: comp.sys.next.programmer
Article #1124Summary: Animating lots of small bitmaps
From: David Strout
Date: Thu, 13 Aug 1992 12:07
Date: Thu, 13 Aug 1992 12:07
31 lines
1312 bytes
1312 bytes
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.
Technical Details
Message-ID:
<22201@venera.isi.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!isi.edu!dstroutReferences:
<22171@venera.isi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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