Chapter
8
DISPLAYING COLOR AND GRAPHICS
Interpreter BASIC includes many commands
to
display text and
graphic images in black and white and in color.
You first select a
screen
mode,
which tells BASIC the size
of
the
screen in points (resolution) and how many colors are available.
It also tells BASIC
whether you are displaying text only or
graphics.
Resolution
The number
of
points on the screen is called the resolution. The
greater the number of points, the sharper the image. The
3
reso-
lutions are:
Low resolution
Medium resolution
High resolution
160 x 200 points
320 x 200 points
640
x
200 points
The horizontal length (x axis) is given first followed by the verti-
cal length (y axis).
Notice that there are more horizontal points than vertical points.
This means that the horizontal points are closer together than
the vertical points. The comparison
of
the number
of
points per
inch vertically
to
horizontally is called the
aspect ratio.
The aspect ratio is computed using the following formula:
number of
number
of
vertical points
horizontal points
aspect ratio
=
-
viewing area
height
viewing area
width
The viewing area is the portion of your screen on which images
are displayed. It may be smaller than the screen itself.
77