[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        Flood -- Flood rastport like areafill.

   SYNOPSIS
        error = Flood( rp, mode, x, y)
        d0            a1   d2  d0  d1

        bool flood(struct rastport *, ulong, short, short);

   FUNCTION
        Search the bitmap starting at (x,y).
        Fill all adjacent pixels if they are:
            Mode 0: not the same color as AOLPen
            Mode 1: the same color as the pixel at (x,y)

        When actually doing the fill use the modes that apply to
        standard areafill routine such as drawmodes and patterns.

   INPUTS
        rp - pointer to rastport
        (x,y) - coordinate in bitmap to start the flood fill at.
        mode -  0 fill all adjacent pixels searching for border.
                1 fill all adjacent pixels that have same pen number
                as the one at (x,y).

   NOTES
        In order to use Flood, the destination rastport must
        have a valid tmpras raster whose size is as large as
        that of the rastport.

   SEE ALSO
        areaend() inittmpras() graphics/rastport.h