Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!rutgers!njin!uupsi!sunic!tut!funic!funic!vinsci From: vinsci@soft.fi (Leonard Norrgard) Newsgroups: comp.sys.amiga.tech Subject: Re: Novice C question Message-ID: Date: 30 Jul 90 21:45:42 GMT References: <1237000012@uxa.cso.uiuc.edu> Sender: vinsci@nic.funet.fi (Leonard Norrgard) Organization: Soft Service, Inc. Lines: 24 In-Reply-To: ragg0270@uxa.cso.uiuc.edu's message of 30 Jul 90 13:50:00 GMT > I want to draw about 2000 pixels in a window. Since these points may > be located arbitrarily anywhere in the window, the easiest way to do > this is to use WritePixel(). But as I understand the RKMs, each > WritePixel() occurs only after 1/60 sec., which means 2000 pixels > takes 2000/60 = 33 secs? This doesn't seem right, but I do know > that WritePixel() takes longer than I would like. Is there a faster > way to do this, short of writing directly to BitMap memory? Ummm. WritePixel() shouldn't wait for anything except blits to complete before it modifies the RastPort. This is slow enough however, if you want to do it a number of thousand times. In addition WritePixel() must obey clipping regions, which slows the process even more as it clips each pixel separately (of course, it doesn't have a choise). A better way would be to draw the pixels in a non-displayed RastPort, but using your own variant of WritePixel(). Then call ClipBlit() to copy your RastPort to a window RastPort(). Thus, you will clip only once and writing a pixel doesn't need to wait for blits to complete. -- Leonard