Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!utah-gr!sunset.utah.edu!u-jmolse From: u-jmolse%sunset.utah.edu@utah-gr.UUCP (John M. Olsen) Newsgroups: comp.sys.amiga.tech Subject: How do I incriment colors fast? Summary: I need an algorithm to incriment colors like a flood fill Message-ID: <2666@utah-gr.UUCP> Date: 17 Jun 88 18:56:10 GMT Sender: news@utah-gr.UUCP Reply-To: u-jmolse%sunset.utah.edu.UUCP@utah-gr.UUCP (John M. Olsen) Organization: University of Utah CS Dept Lines: 16 First the problem: I have a line equation in slope, y-intercept format, and need to incriment or decriment all of the colors on one side of that line. First try solution: When a pixel needs modifying, I read it's color, do a SetAPen(r,color + 1L) and then write the pixel back out. I also check to make sure that 0 doesn't decriment and 31 doesn't incriment. There's gotta be a better way. Any suggestions? I can't see that I'd get a benefit from reading bitmaps and doing it a word at a time since that word may contain 16 different colors that require incrimenting. /| | /||| /\| | John M. Olsen, 1547 Jamestown Drive \|()|\|\_ |||. \/|/)@|\_ | Salt Lake City, UT 84121-2051 | u-jmolse@ug.utah.edu or ...!ihnp4!utah-cs!utah-ug!u-jmolse "What is mind? No matter. What is matter? Never mind." -T. H. key