[comp.sys.amiga.tech] How do I incriment colors fast?

u-jmolse%sunset.utah.edu@utah-gr.UUCP (John M. Olsen) (06/18/88)

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