Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!maverick.ksu.ksu.edu!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.programmer Subject: Re: tryin' to create a Flood ().... Message-ID: <28113.279d8506@kuhub.cc.ukans.edu> Date: 23 Jan 91 18:43:50 GMT References: <1991Jan23.031010.11248@cs.uiuc.edu> <1991Jan23.034804.6498@cs.uiuc.edu> Organization: University of Kansas Academic Computing Services Lines: 40 > Do I need to set aside a TmpRas? Do I need to change something else in my > RastPort? Am I even using the correct RastPort? Like, ought I go to the > Screen's RastPort (aren't they the same?)? I feel like I'm fishing in the > dark a little here... Bingo. Use the windows Rastport, and allocate a TmpRas and bitplane and fill in the field and stuff. Here is some simple sample code: struct Window *MyWindow; struct TmpRas MyTmpRas; PLANEPTR *MyPlane; /* ...assume window is now open and cant get bigger than WIDTH and HEIGHT */ MyPlane = AllocRaster(WIDTH, HEIGHT); if (!MyPlane) { /* ..barf and die..*/ } InitTmpRas(&MyTmpRas, MyPlane, RASSIZE(WIDTH, HEIGHT)); MyWindow->RPort->TmpRas = &MyTmpRas; /* ..when done clean up */ MyWindow->RPort->TmpRas = NULL; FreeRaster(WIDTH, HEIGHT); > Thanks! No problem. Note that a TmpRas is only one bitplane, and that it must be as big as the largest possible fill (ie: ScreenSize generally) just in case the Flood() leaks you dont want it to scribble on memory. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: markgood \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~