C C========================================================================== C C Tektronix 4010 graphics driver C C 8.0" x 6.0" (1024 x 780) C C========================================================================== C JDEV = JDEV - 1 IF (JDEV .NE. 0) GOTO 1999 C IF ((IMODE .LT. -5) .OR. (IMODE .GT. 6)) RETURN GOTO (1000,1005,1010,1020,1030,1040,1050,1060,1070,1090,1095,1100), 1 IMODE+6 C C mode -5: we exist C 1000 X = 1.0 GOTO 90 C C mode -4: initialize C 1005 CALL GTATT(LUNGRP) ! attach the terminal, set up the loon GOTO 90 C C mode -3: return screen size C 1010 X = 8.0 Y = 6.0 GOTO 90 C C mode -2: alpha cursor position C 1020 CALL GTTEKI(IX,IY,I,2) ! request alpha cursor position X = IX / 127.875 Y = IY / 130.000 GOTO 90 C C mode -1: graphics cursor position C 1030 CALL GTTEKI(IX,IY,I,1) ! request graphics cursor position X = IX / 127.875 Y = IY / 130.000 XT = XTLAST ! get where we were ... YT = YTLAST GOTO 1050 ! and put us back there C C mode 0: initialize and clear screen C 1040 CALL GT(ESCAPE) ! clear screen: CALL GT("14) CALL GTF ! flush the buffer (do it) GOTO 90 C C mode 1: unwritten vector C 1050 CALL GT("35) ! invokes graphics; dark vect 1st GOTO 1080 C C mode 2: written vector C 1060 GOTO 1080 ! must assume in graf mode. do it. C C mode 3: point plot C 1070 CALL GT("34) ! invokes point plot mode C C modes 1,2,3: send out the X,Y coordinates C 1080 IX = MIN1(1023.,AMAX1(0.,127.875*XT+0.5)) IY = MIN1( 779.,AMAX1(0.,130.000*YT+0.5)) CALL GTTEK(IX,IY) GOTO 90 C C mode 4: finish the plot C 1090 CALL GT("35) ! dark vector CALL GTTEK(0,779) ! to the top left corner CALL GT("15) ! enter alpha mode CALL GTF ! flush the buffer CALL GTATT(-LUNGRP) ! deattach the terminal CALL CLOSE(LUNGRP) GOTO 90 C C mode 5: set nibs and linepattern C 1095 NIBS = X LINPAT = Y GOTO 90 C C mode 6: identify ourself C 1100 WRITE (LUN,1110) 1110 FORMAT('+ Tektronix 4010 graphics terminal') GOTO 90 C C and link to the next device C 1999 CONTINUE