[comp.sys.amiga.programmer] Help makeing a Paint Routine!!!!!

spence@cbmvax.commodore.com (Spencer Shanson) (01/30/91)

In article <1991Jan28.155652.46766@cc.usu.edu> slmt9@cc.usu.edu writes:
>
>	Hello,
>	
>	I need help trying to make a Paint() routine in C. I have tried to 
>use the Flood routine from the Graphics Library? (not sure here maybe
>intuition?!!?) Anyway It does nothing. It accepts 2 different options. A 1 or
>a 0. But neither does anything. I saw some posts on this subject. But have no
>idea what they meant. If anyone has one that they are willing to share or just
>the idea then please let me know.
>
Flood() in graphics.library does work. However, under 2.0, if you do not have
a TmpRas at least as large as the rastport then Flood() will exit quietly
without doing anything. This could be your problem if running under 2.0.

Also, Flood() can run in one of two modes. Mode 0 fills all adjacent pixels
(from the start position) until it finds a border defined in pen number
rp->AOLPen. If the start pixel is this colour, then the flood is completed.

Mode 1 fills all adjacent pixels that have the same pen number as the start
pixel. Similarly, if there are no adjacent pixels of the same pen number, then
the flood is completed.

Hope that helps.

>	Thanks in advance,
>	
>	Joshua
>	SLMT9@cc.usu.edu


-- 
---------------------------------------------------------------------------
Spencer Shanson - Amiga Software Engineer     | email: spence@commodore.COM
                                              | or uunet!cbmvax!spence
All opinions expressed are my own, and do not | "A picture is worth 1000
(necessarily) represent those of Commodore.   | words, or about 300,000
                                              | bytes."