HTML-IMAGE.nr 0C 0 HTML-IMAGE-END.lf 1 -
GRAPHICS
HP Graphics are performed by writing on logical unit 6
The subroutines for graphics are:
INITT (I)
Sets the graphics mode:
g2 HP2393A compatible graphics, Set White on Black mode g3 HP2393A compatible graphics, Compliment, White on Black mode g4 HP2393A compatible graphics, Jam mode, white on black (DEFAULT) g11 HP2393A compatible graphics, Set Black on White mode g13 HP2393A compatible graphics, Compliment, Black on White mode g20 Tektronix Plot 10 compatible graphics terminals g21 DEC VT240 with (sort of) Tektronix Plot 10 graphics g22 GTERM (Tektronix window in a Sun gterm window) g50 X-Windows using an hpterm window (see X-NOTE below) g51 X-Windows using an xterm window (see X-NOTE below) g99 Scrolling mode (non-graphics terminal) g100 Televideo 914 alphanumeric terminal with no graphics Other numbers <10 = Jam mode, White on black (default) Other numbers >10 = Jam mode, black on white
The subroutine RESPAG is called then the line type is set to 1.
X-Windows NOTES:
• When running X-windows, the environment variable DISPLAY must be set to your X server.
• Every time you enter specpr, you must re-initialize the graphics window by typing g50 or g51 or by specifying the graphics mode on the command line as specified in section 3.1.
• User input always comes from the text window except for mouse button clicks which are entered in the graphics window.
• If the graphics window is hidden and then exposed, it will not be redrawn.
OTHTRM
is called by other graphics if the graphics mode is set to 99 (see INITT) each call to this subroutine scrolls the terminal 6 lines.
HPLINE (I)
Sets the line type = 0 increment line type, 1 to 10 but
not 2 or 3
= 1 Set line type = 1
= 2 not valid
= 3 not valid
= 4 through 10: set line type = I
If I < 0 or > 10, I is reset to 1
HRESET (I)
Resets the terminal = 0: hard reset
≠ 0: turn off graphics display and graphics text and turn
on alpha display
HBELL (I)
Sounds the Bell I times.
if I < 0 there is a 1 second delay between beeps
VGRMOD
Sets the terminal to the vector graphics drawing mode.
RESPAG
Resets the graphics to the terminal by: graphics on, clear, alpha off, Zoom = 1, graphics cursor on, graphics text on, rubber band line off, cursor at top left line of screen (coordinates 0, 350) and programs this into the f5 button on the terminal. calls VGRMOD
HPPLOT
Puts the terminal in plotting mode
DRWABS (IX, IY)
Draws a vector from the current cursor position to absolute position IX, IY. (pen is down) Data is sent in absolute binary for the fastest possible graphics commands. Calls HPPLOT if the terminal is not in plotting mode. Calls HPABS
MOVABS (IX, IY)
Moves the cursor to absolute position (IX, IY) (pen is up). Data is sent in absolute binary for the fastest possible graphics commands Calls HPPLOT if the terminal is not in plotting mode. Calls HPABS
HPABS (IX, IY)
Converts IX, IY to absolute binary (by calling ABSBIN) and sends the converted values to the terminal.
SB (I)
Calls TEXMOD, sets the graphics mode to I (see INITT) and calls VGRMOD. (if I = 0, only TEXMOD is called)
TMOVE
This subroutine moves the text cursor to the last graphics cursor position as given by DRWABS or MOVABS. calls CONVRT
TEXMOD
This subroutine sets the terminal to the graphics text mode and calls TMOVE. This routine must be called each time you want to do a FORTRAN write or read after performing graphics.
NEWPAG
calls RESPAG
Sample: draw an X on the screen and write Hello, and sound Bell:
character*80 outline # for X-window writes
CALL INITT (0)
CALL RESPAG
CALL MOVABS (0, 0)
CALL DRAWABS (760, 320)
CALL MOVABS (760, 0)
CALL DRAWABS (0, 320)
CALL MOVABS (300, 200)
CALL TEXMOD -[or CALL SB (0)]
k=123
write(outline,40) ’ Hello’,k
40
format (a,i3)
call gwrite(outline)
CALL HBELL (1)
STOP
END