🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9114

How do I incriment colors fast?

#9114
From: John M. Olsen
Date: Fri, 17 Jun 1988 18:56
16 lines
1380 bytes
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
Technical Details
Message-ID: <2666@utah-gr.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!utah-gr!sunset.utah.edu!u-jmolse

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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