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>line draw line or box</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LINE                     Draw Line or Box

 LINE [[STEP] (x1,y1)] - [STEP] (x2,y2) [,[color] [,B[F]]] [,style]

    Draws a line or a box at specified coordinates, in a specified color.

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

       x1,y1    If ,B option is used, x1,y1 and x2,y2 are corner
       x2,y2    coordinates of a rectangular box; otherwise x1,y1 and
                x2,y2 are end points of a line.

       color    Specifies color to use . Defaults to 3 in medium
                resolution, 1 in high resolution.

           B    Tells BASIC to draw a rectangular box instead of a line.

           F    Tells BASIC to fill the box.

       style    Allows you to draw a broken (dashed) line or box (see
                below).

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

      Notes:    If STEP is included with x2,y2 but not x1,y1, then x2 and
                y2 are measured relative to the absolute coordinate pair
                (x1,y1).

                QuickBASIC treats style as a 16-bit integer mask, plotting
                the 1 bits and skipping the 0 bits, and repeating the
                pattern as many times as necessary to create the specified
                line. Thus a style value of 43690 (AAAAh,
                1010101010101010b) would produce an evenly dotted line or
                box, with every other pixel plotted. Note that QuickBASIC
                ignores the "off" pixels; it does not plot them in the
                background color.

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