HTBasic Help
×
Menu
Index

Graphic Input

 
GRAPHIC INPUT drivers used by DIGITIZE, READ LOCATOR and SET LOCATOR are:
               
Name
For These Devices
KBD
Mouse and arrow keys
KBDA
Mouse (Absolute) and arrow keys
HPGL
HPGL Digitizers or Plotters
TABLET
Most available digitizing tablets
 
 

GRAPHICS INPUT IS

GRAPHICS INPUT IS loads or selects drivers and an interface. For example:
 
GRAPHICS INPUT IS device-selector, "driver-name[;options]" 
 
The device-selector specifies the device or interface to use. This is usually KBD, but can also be a GPIB or Serial interface select code. The driver name and options are specified in a string expression with a Driver-name from the table above. For example:
 
GRAPHICS INPUT IS 705,"HPGL"
GRAPHICS INPUT IS 705,"TABLET;BIN-2,0,5000,0,5000"
 

Loading

The first time GRAPHICS INPUT IS executes, the driver is loaded and used for graphics input. On subsequent executions the driver is not reloaded, but is simply selected.
 
You may want to include GRAPHICS INPUT statements in your AUTOST file to load any necessary drivers. Up to ten graphic and dump drivers can be loaded at a time. HTBasic automatically loads the "KBD" driver when it starts.
 
To find the driver file HTBasic appends ".DW6" to the device name and then searches the following locations:
 
1. The directory containing the HTBasic executable.
2. The current directory.
3. The Windows system directory (such as \WINDOWS\SYSTEM).
4. The Windows directory.
5. The directories listed in the PATH environment variable.
 

KBD graphics input

KBD (the keyboard and mouse) is the default graphics input device and takes X and Y coordinates from the mouse. If you have selected an alternate digitizer device, you switch back to the KBD for graphics input with:
 
GRAPHICS INPUT IS KBD,"KBD"
 
The following example shows how to use KBD as the graphics input device:
 
PLOTTER IS CRT,"INTERNAL"
GRAPHICS INPUT IS KBD,"KBD"
TRACK CRT IS ON
FRAME
DIGITIZE X,Y,S$
PRINT X,Y,S$
END 
 

HPGL graphics input

The HPGL graphics input driver provides support for any input device that accepts HPGL (Hewlett Packard Graphic Language). The following example assumes an HPGL capable device is attached to the IEEE-488 bus at primary address 5:
 
GRAPHICS INPUT IS 705,"HPGL"
 
 

Digitizing TABLETs

The TABLET graphics input driver supports serial and GPIB digitizers. To load:
 
GRAPHICS INPUT IS Isc,"TABLET;[mode[,]][resolution]" 
 
The mode option allows you to specify the method in which the tablet’s data is interpreted by the driver. If both mode and resolution options are specified, specify the mode option first and separate the two by a comma. The following table gives the values for mode:
 
Mode
Meaning
(None)
Comma separated ASCII
BIN-1
Summagraphics MM Binary Format
BIN-2
Hitachi Binary Format
BIN-3
UIOF Binary Format.
 
If no mode is specified, the driver assumes the tablet is using a comma separated, CR/LF terminated, ASCII data format. The ASCII format and the different binary formats are discussed below.
 
The resolution option is of the form Xmin,Xmax,Ymin,Ymax. The resolution option is only necessary if the tablets range of X & Y values are different from the default values of 0-11000 in both the X & Y directions. The resolution option is discussed in greater detail below.
 
Examples:
 
GRAPHICS INPUT IS 9,"TABLET"
GRAPHICS INPUT IS 9,"TABLET;BIN-1"
GRAPHICS INPUT IS 705,"TABLET;0,5000,0,5000"
GRAPHICS INPUT IS 705,"TABLET;BIN-2,0,5000,0,5000"