Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!ucsd!usc!apple!snorkelwacker!bloom-beacon!cht From: cht@athena.mit.edu (Chester Liu) Newsgroups: comp.sys.mac.programmer Subject: Drawing rectangles FAST! Keywords: draw rectangles Message-ID: <1990Jun13.154424.5357@athena.mit.edu> Date: 13 Jun 90 15:44:24 GMT Sender: news@athena.mit.edu (News system) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 22 Hi, I wrote a program in Think C 4.0 that is similar to the cellular automata game called "Life". I need to update a grid comprised of different colored squares really fast to simulate animation. Right now, I call RGBForeColor(color); and PaintRect(&dstRect); for every single square in the grid. It's painfully slow (I have a Mac IIcx) considering how fast other "life"-like programs zip through their animation sequences. Can anyone suggest a routine that will read from a 2-D array and paint squares really fast? I fill the screen with a 70x50 grid with 3 possible colors. Right now it takes about 2 seconds to do so. Thanks! Chester cht@athena.mit.edu or cht@eddie.mit.edu