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>get read points from screen graphics</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GET                      Read Points from Screen                     Graphics

 GET (x1,y1)-(x2,y2),arrayname

    Copies attributes from a specified rectangle within the screen buffer
    into a specified array.

       x1,y1    Upper left corner of the rectangle to be copied.

       x2,y2    Lower right corner of the rectangle to be copied.

   arrayname    The name of a numeric array.

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

      Notes:    To determine how large the array must be, use the
                following formula:

                    4+INT(((x2-x1+1)*bitsperpixel+7)/8)*((y2-y1)+1)

                where bitsperpixel relates to screen mode as follows:

                    Mode      Bitsperpixel
                    SCREEN 1       2
                    SCREEN 2       1
                    SCREEN 7       4
                    SCREEN 8       4
                    SCREEN 9       2 (EGA memory = 64K)
                                   4 (EGA memory > 64K)
                    SCREEN 10      2

                The amount of memory allocated per array element is as
                follows:

                    Integer:            2 bytes per element
                    Single-precision:   4 bytes per element
                    Double-precision:   8 bytes per element

                The first two bytes returned by the GET statement indicate
                the horizontal dimension of the screen rectangle, in bits;
                the second two bytes indicate the vertical dimension. The
                remainder of the data returned by GET are the attributes
                for each pixel in the rectangle.

See Also: PUT (Graphics)

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