Tandy 1000 Basic Reference Manual page 269

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chawter
10 I
BASIC Kevwords
POINT/Graphics
Function
POINT
(x,y)
POINT (action)
Returns the color number of
a
point on the screen or returns the
current physical or world coordinates.
(x,y)
specify the coordinates of the point.
x
is the horizontal
point, and
y
is the vertical point. The
x
and
y
coordinates must
be absolute values. If you specify a point that is out of range,
BASIC returns a -1.
See Chapter 8, "Displaying Color and Graphics," for information
on coordinates for the current screen modes.
Action is one of the following:
0 returns the current physical x-coordinate (horizontal).
1 returns the current physical y-coordinate (vertical).
2 If WINDOW is active, returns the world x-coordinate.
3 If WINDOW is active, returns the world y-coordinate.
When retrieving the color number, POINT returns the color
number as it is defined in the current palette.
Otherwise, returns the physical x-coordinate.
Otherwise, returns the physical y-coordinate.
Example
1 0 SCREEN 2
20 I F P O I N T
( 1 , 1 ) < > 0 THEN P R E S E T ( 1 ,I 1 E L S E P S E T
( 1
, I )
If point
1,l
is any foreground color, PRESET changes it t o the
background color.
If
the point
is the
background
color,
PSET
changes it to Color 3.
1 0 SCREEN 1
20 X = P O I N T ( 0 ) : Y = P O I N T ( I )
3 0 P R I N T X , Y
BASIC prints the coordinates of the graphics cursor.
267

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents