Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!wuarchive!uunet!stanford.edu!agate!darkstar!ucscf.UCSC.EDU!davids From: davids@ucscf.UCSC.EDU (Dave Schreiber) Newsgroups: comp.sys.amiga.programmer Subject: I can't get Flood() to work! Message-ID: <15629@darkstar.ucsc.edu> Date: 10 May 91 17:40:42 GMT Sender: usenet@darkstar.ucsc.edu Organization: University of California, Santa Cruz Lines: 54 I'm having a problem figuring out how the Flood() function works. I've been able to get flood mode #0 (flood to the outline color) to work, but it's incredibly slow (even on my 3000), and not really what I want anyway. Mode #1 (flood the block of color at the given coordinates), on the other hand, looks like it will fit the bill, but I haven't been able to get it to work. Here's a code sample that illustrates what I'm trying to do (ignoring the fact that this could be done with RectFill or AreaInfo): #include #include struct NewWindow NW = {0,0,300,200,-1,-1,NULL,WINDOWDRAG,NULL,NULL,"Window",NULL,NULL, 0,0,640,400,WBENCHSCREEN}; struct Library *IntuitionBase,*GfxBase; struct Window *wdw; #define Rp wdw->RPort main() { /*Open libraries*/ IntuitionBase=(struct Library *)OpenLibrary("intuition.library",0L); GfxBase=(struct Library *)OpenLibrary("graphics.library",0L); wdw=(struct Window *)OpenWindow(&NW); /*Open window*/ if(wdw==NULL) /*Exit if not opened*/ exit(1000); SetDrMd(Rp,JAM1); /*Set drawing mode and pen*/ SetAPen(Rp,1); Move(Rp,15,20); /*Create a box from (15,20) to (100,100)*/ Draw(Rp,15,100); Draw(Rp,100,100); Draw(Rp,100,20); Draw(Rp,15,20); Flood(wdw->RPort,1,30,30); /*And fill it (but it doesn't work!)*/ Delay(100); /*Pause for a bit...*/ CloseWindow(wdw); /*Cleanup and exit*/ exit(0); } I'd appreciate it if someone could point out what I'm missing. Thanks. -- Dave Schreiber E-mail: davids@ucscf.ucsc.edu "It was fun learning about logic, but I don't see where or when I will ever use it again." Disclaimer: