Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!emmayche From: emmayche@dhw68k.cts.com (Mark Hartman) Newsgroups: comp.sys.mac.programmer Subject: Re: Large Offscreen Drawing - help please Message-ID: <1990Nov20.170334.12650@dhw68k.cts.com> Date: 20 Nov 90 17:03:34 GMT References: <11722@hubcap.clemson.edu> <1990Nov19.205344.9317@midway.uchicago.edu> Organization: Wolfskill & Dowling residence; Anaheim, CA (USA) Lines: 35 In article <1990Nov19.205344.9317@midway.uchicago.edu> francis@daisy.uchicago.edu (Francis Stracke) writes: >In article <11722@hubcap.clemson.edu> jcocon@hubcap.clemson.edu (james c oconnor) writes: >>A friend and I are fiddling around with off screen drawing to give zooms >>and fast scrolling on some graphical data. On the zoom, we allocate a >>huge bitmap (16,000 by 16,000) on an offscreen port. We then call eraseRect >>on the (0,0) and (16000,16000), but it only clears the upper left corner >>of the bitmap, and scrolling around shows dirty memory. Aside from the >>wisdom of allocating such a large block of memory (we are PLAYING), is there >>something we are missing? > >Isn't that enough? Have you thought about just how huge this is? >RowBytes=2000, for God's sake! This means you would need 32G to hold >the damned thing! If you've got 32 gigabytes in your Mac, please >tell me what decade you're going to buy it! 32 GIGAbytes? I thought 2000 bytes * 16000 rows = 32,000,000 bytes or 32Mb. This is still way too much - but how'd you figure 32,000,000,000 bytes? To James: this sounds like a great way to crash your Mac. Try a smaller bitmap, and make sure that your clipRgn for your offscreen port is as large as it can be (generally a rectangle [(-32767,-32767),(32767,32767)], otherwise known as "mobyBigRect"). >| Francis Stracke | My opinions are my own. I don't steal them.| >| Department of Mathematics |=============================================| >| University of Chicago | Non sequiturs make me eat lampshades | >| francis@zaphod.uchicago.edu | | -- ========================================================================= Mark Hartman, N6BMO |"What are you standing uucp: ...{spsd,zardoz,felix}!dhw68k!emmayche |there for? Where do Internet: emmayche@dhw68k.cts.com |you think you are,