Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>paint fill an area with a pattern or color</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PAINT                    Fill an Area with a Pattern or Color

 PAINT [STEP] (x,y) [[,color] [,boundary] [,background]]

    Fills an enclosed area on the graphics screen with a specific color or
    pattern.

        STEP    If included, coordinates are relative to last graphics
                point referenced (LPR). If omitted, coordinates are
                absolute.

         x,y    Screen coordinate (column, row) within the area that is to
                be filled.

       color    A numeric or string expression. If numeric, specifies
                color to fill area with; if string, specifies a bit
                pattern to fill the area with. If this argument is
                omitted, the foreground color will be used.

    boundary    The color of the border of the area to be filled. PAINT
                stops filling when it reaches this color. If this argument
                is omitted, then color will be used.

  background    A string expression specifying the background tile slice
                to skip when checking for termination of the boundary.
                This allows you to repaint an already painted area.

   --------------------------------------------------------------------------

     Notes:     If color is a string expression, each character (8 bits)
                in the string represents one scan line. Each character
                therefore represents the status of 4 pixels in medium-
                resolution and 8 pixels in high-resolution. The string can
                be from 1 to 64 bytes long (thus allowing 1 to 64 scan
                lines vertically).

                Ensure that the area to be filled is completely enclosed,
                or else "leaking" may destroy the entire drawing.

                background is used to determine the stop condition when
                filling an already painted area. If an existing pixel is
                encountered that agrees with the corresponding bit in
                background, then filling doesn't stop.

See Also: CIRCLE DRAW

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson