Chapter
10
I
BASIC
Ke-ywords
For this example, you need an integer array with 20 elements, a
single precision array with 10 elements,
or
a double precision ar-
ray with
7
elements.
The information from the display
is
stored in the array as:
Element 0
Element
1
The remaining elements of the array store the data bits
of
the
image. Numeric data is stored low byte first and then high byte,
but the data is transferred high byte first and then low byte.
You use the GETiGraphics and PUTiGraphics statements
to-
gether for animation and high-speed object motion in the graph-
ics modes. See also PUTiGraphics statement.
the
x
dimension
of
the image
the y dimension of the image
Note:
GET and PUT work faster in all resolutions
if:
xIMOD(8/bits
per
point)
=
0
(See Chapter
5
for an explanation
of
MOD.)
Sample
Program
10
DIM
A(50,50)
20
SCREEN
1
30
CIRCLE
(30,30),20
40 PAINT (30,301
50
GET
(10,0)-(50,50),A
60 PUT (200,1001,A
70
END
Line 10 sets up an array for storage. Line 20 selects the screen
mode. Line 30 draws a circle, and Line 40 fills in the circle. Line
50 gets the circle, and stores
it
in
Array A(). Line
60
retrieves
the circle, and puts it on the screen in a new location.
171