Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!trantor.harris-atd.com!x102c!dfranck From: dfranck@x102c.harris-atd.com (franck deniz 01591) Newsgroups: comp.sys.mac.programmer Subject: Garbage in the window/pane using bitmaps Message-ID: <6287@trantor.harris-atd.com> Date: 16 May 91 18:24:12 GMT References: <1991May12.192551.3732@cs.yale.edu> <1991May13.232453.18998@cs.yale.edu> Sender: news@trantor.harris-atd.com Reply-To: dfranck@x102c.ess.harris.com (franck deniz 01591) Distribution: comp.sys.mac.programmer Organization: Harris Corporation GSS, Melbourne, Florida Lines: 49 Thanks to everyone who replied to my gopher/dawdle questions last time -- I used all of your suggestions! Now I have a problem concerning bitmaps... I am now trying to "randomly" (using a chore/dawdle) print lines to a pane with a bitmap. I have a Draw() and DoDawdle() ( a chore) method that I think should take care of it, but I am getting a bunch of "noise" on the bottom of my window. Plus, I only occasionally get my line. Since I dont know if I am explaining this correctly, here is the code: Draw() { Rect NSpecGrid; SpecGrid = GetPicture(129); /* instance variable holding resource */ this->getAperture(&NSpecGrid); /* this is the pane object/screen */ itsBitMap->BeginDrawing(); DrawPicture(SpecGrid, &NSpecGrid); itsBitMap->EndDrawing(); itsBitMap->CopyFrom(&NSpecGrid, &NSpecGrid, NULL); } DoDawdle(long *maxSleep); { Rect NSpecGrid; *maxSleep = 12; Prepare(); itsBitMap->CopyTo(&NSpecGrid,&NSpecGrid,NULL); /* added this in desperation*/ /* ^^^ this also cleaned up a "noise" square in the upper left */ itsBitMap->BeginDrawing(); DrawPicture(SpecGrid, &NSpecGrid); MoveTo(500,100); /* this is the line */ Line(0,50); itsBitMap->EndDrawing(); Prepare(); itsBitMap->CopyFrom(&NSpecGrid, &NSpecGrid, NULL); } Any suggestions as to why garbage appears as a result of this would be GREATLY appreciated! Deniz Franck