Chapter
10
I
BASIC
Ke-ywords
GET/Graphics
~ ~
Statement
Transfers points from an area on the display
to
an array.
(x1,yl)
specifies the coordinates where the image begins.
(x2,y2)
specifies the coordinates where the image ends.
x
is the horizontal coordinate and
y
is the vertical coordinate.
The ranges for the coordinates depend on the screen mode. See
Chapter
8,
“Displaying Color and Graphics,” for more
information.
Array
is a numeric array
to
hold the image. It must be dimen-
sioned large enough
to
hold the entire image.
To
ensure that the
array is large enough
to
hold the image, use the following
formula:
4
+
(INT((F,
*
b
+
7)/8)
*
u)
where:
h
is the length of the horizontal side
of
the image.
b
the number of bits per point
(2
in Screen Modes
1,
4,
and
u
is the length of the vertical side
of
the image.
6;
1
in Screen Mode
2;
and
4
in Screen Modes
3
and
5).
For example,
to
store an image that is
10
by
12
in Screen Mode
1,
type:
4
+
(INT((10
*
2
+
7)/8)
*
12)
=
40
The array must store
40
bytes. The number
of
bytes per element
of
an array are
2
for integer,
4
for single precision, and
6
for dou-
ble precision.
170