Chapter
8
I
Displaying Color and Graphics
Screen
Mode
6
Color
Set: 4
Graphics Resolution: high resolution
Aspect Ratio:
5112
Text
Width:
80
Video Page Size: 32768 bytes
Max. No. of Pages: 4
640 x 200
Specifying Coordinates
To draw your graphics images on the display, you must tell
BASIC where to put the image on the screen. To do this, you
must specify horizontal and vertical points.
The horizontal and vertical point numbers are known as the co-
ordinates. Coordinates are expressed as x-coordinate, y-coordi-
nate or simply
x
and
y.
(x
is the horizontal point number, and
y
is the vertical point number.)
When you specify specific points as coordinates, they are re-
ferred
to
as absolute coordinates.
You may also, in some commands, specify coordinates relative to
the current point on the screen. In this case, you specify the
number of points from the last graphics point referenced. For ex-
ample, if you use the CIRCLE statement
to
draw a circle, the
last point referenced is the center of the circle. If you then exe-
cute a LINE statement, using relative coordinates
of
(0,0)
to
specify the beginning point, BASIC begins drawing the line at
the center
of
the circle.
You may specify positive
or
negative values as relative coordi-
nates.
If
you specify a negative value, BASIC subtracts it from
the coordinate of the last point referenced. If you specify positive
values, BASIC adds it to the coordinate
of
the last point
referenced.
82