ChuDter
10
I
BASIC Keywords
VIE
WIGraphics
Statement
Creates
a
viewport
that
redefines the screen parameters. This
defined
area,
a
window, becomes the only place you can draw
graphic displays.
(XI
,yI)
specifies the upper-left coordinates for the rectangular
viewport.
(~232)
specifies the lower-right coordinates for the rectangular
viewport.
All coordinates must be within the limitations of the screen.
Color
lets you fill in the specified viewport with the specified
color. See Chapter
8,
“Displaying Color and Graphics,” for infor-
mation on color.
Border
is an integer in the range 0 to 15. See Chapter
8,
“Dis-
playing Color and Graphics,” for information on the 16 color set
used for borders.
SCREEN specifies that all coordinates used in drawing are ab-
solute to Point 0,0 on
the
screen. If you omit SCREEN, all coor-
dinates specified are relative to the viewport coordinates.
If you omit all options, BASIC sets the viewport to define the en-
tire screen.
Examples
VIEW (10,10)-(100,1 00)
sets up
a
viewport with the upper-left corner
at
10,10 and the
lower-right corner at 100,100. Since SCREEN is omitted, all
subsequent coordinates are relative to the viewport.
For
example,
PSET
(5,5),3
actually sets point 15,15.
VIEW
SCREEN
<20,25)-<100,150)
sets up
a
viewport. Because SCREEN
is
specified, all subse-
quent coordinates are absolute.
For
example, PSET (5,5),3 does
not appear because
it
is
outside the viewport. PSET (30,30),3 is
within the viewport.
337