| 1 |
C Copyright(C) 1999-2020, 2025 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
C VDMOVA VDMONI VDGNAM VBIQDV VBIQPK VDLINA VDTEXT VDPNTA VDPOLY VDIQCP VDSTOS |
| 8 |
C WPSTMV WPSTMO WPSTGN WPSTIV WPSTQP WPSTLN WPSTTX WPSTPT WPSTPY WPSTCP WPSTOS |
| 9 |
|
| 10 |
C VDIQOS VDSTFC VDSTBC VDSTIN VDSTLS VDSTLW VDSTCS VDAABU VDALOC VDABGL VDAKGL |
| 11 |
C WPSTIO WPSTFC WPSTBC WPSTIN WPSTLS WPSTLW WPSTCS WPSTBU WPSTLO WPSTBL WPSTKL |
| 12 |
|
| 13 |
C VDSTLA VDINIT VDFRAM VDTERM VDIQDC VDNWPG VDBELL VDWAIT VDBUFL VDSTCO VDIQCO |
| 14 |
C WPSTLA WPSTNT WPSTFR WPSTTR WPSTDC WPSTPG WPSTBE WPSTWT WPSTFL WPSTCO WPSTIC |
| 15 |
|
| 16 |
C VDESCP VDIQES VDIQND VIMOVA VILINA VIPNTA VITEXT VIINIT VITERM VINWPG CDRCOM |
| 17 |
C WPSTES WPSTIE WPSTID WPSTIM WPSTIL WPSTIP WPSTIX WPSTII WPSTIT WPSTIG CDRCOM |
| 18 |
|
| 19 |
C VCJOB VCONOD VBERRH VDLOGE CDRWFS CDRRFS CDROFS CDROF3 CDRCFS CDROFF CDROAB |
| 20 |
C VCJOB WPSTON WPSTER WPSTLE WPSTWF WPSTRF WPSTOF WPSTO3 WPSTCF WPSTFF WPSTAB |
| 21 |
|
| 22 |
C BGPBUF QMSBUF QMSBU1 DDCBUF H75BUF BTKBUF NMTBUF ONHBUF VBIMBF VBPKG VBDEV |
| 23 |
C WPSTBF WPSTQM WPSTBF WPSTBF WPSTBF WPSTBF WPSTBF WPSTOH WPSTIB WPSTPK WPSTDV |
| 24 |
|
| 25 |
C VDIQRS VDSTMP VDSTRS VDSTRV VDBRGB VDFRGB VDPIXL VDPIXI VDRPIX VDRPXI VDRSCL |
| 26 |
C WPSTQR WPSTMP WPSTRS WPSTRV WPSTBG WPSTFG WPSTPX WPSTPI WPSTRP WPSTRI WPSTRL |
| 27 |
|
| 28 |
C VDIQCI VBSTMP VCNDCM VCATTR VIFRAM VCCRPS VCESCP DEVCAP VCSCAL VCDDIM VIPOLY |
| 29 |
C WPSTCI WPST01 WPST02 WPST03 WPST04 WPST05 WPST06 WPST07 WPST08 WPST09 WPST10 |
| 30 |
|
| 31 |
C VCVECT VBLINA VBVECT VBSTLS PSTBUF |
| 32 |
C WPST11 WPST12 WPST13 WPST14 WPST15 |
| 33 |
|
| 34 |
SUBROUTINE WPST01( IMAP ) |
| 35 |
GOTO (1,2,3,4,5),IMAP |
| 36 |
|
| 37 |
CALL WPSTMP('UNKNOWN') |
| 38 |
RETURN |
| 39 |
|
| 40 |
1 CALL WPSTMP('1-TO-1') |
| 41 |
RETURN |
| 42 |
|
| 43 |
2 CALL WPSTMP('REPLICATE') |
| 44 |
RETURN |
| 45 |
|
| 46 |
3 CALL WPSTMP('VIRTUAL') |
| 47 |
RETURN |
| 48 |
|
| 49 |
4 CALL WPSTMP('NODISTORT') |
| 50 |
RETURN |
| 51 |
|
| 52 |
5 CALL WPSTMP('FREEFORM') |
| 53 |
RETURN |
| 54 |
|
| 55 |
END |
| 56 |
SUBROUTINE WPSTRS(I1,I2) |
| 57 |
c************************************************************************* |
| 58 |
c This routine is to satisfy entry points used with raster vdi stuff |
| 59 |
c but not with regular vdi stuff. This is done so raster vdi programs |
| 60 |
c can link with regular vdi. |
| 61 |
c************************************************************************* |
| 62 |
CHARACTER C1*(*) |
| 63 |
REAL RA1(1),RA2(1),RA3(1) |
| 64 |
INTEGER IA1(1),IA2(1) |
| 65 |
ENTRY WPSTRV(R1,R2,R3,R4) |
| 66 |
ENTRY WPSTMP(C1) |
| 67 |
ENTRY WPSTPX(I1,I2,RA1,RA2,RA3,I3) |
| 68 |
ENTRY WPSTRP(I1,I2,I3,RA1,RA2,RA3,IA1) |
| 69 |
ENTRY WPSTPI(I1,I2,IA1,I3) |
| 70 |
ENTRY WPSTRI(I1,I2,I3,IA1,IA2) |
| 71 |
ENTRY WPSTQR(I1,RA1) |
| 72 |
ENTRY WPSTRL |
| 73 |
ENTRY WPSTFG(R1,R2,R3) |
| 74 |
ENTRY WPSTBG(R1,R2,R3) |
| 75 |
ENTRY WPSTCI(R1,R2,R3,I1) |
| 76 |
RETURN |
| 77 |
END |
| 78 |
SUBROUTINE WPSTER(ERRNUM,ERRSEV) |
| 79 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 80 |
|
| 81 |
C VBERRH -Error Handler. |
| 82 |
|
| 83 |
C R.W.Simons -08APR81 |
| 84 |
C 30SEP81 |
| 85 |
|
| 86 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 87 |
C Device-independent. |
| 88 |
|
| 89 |
C ENTRY CONDITIONS -ERRNUM = integer error number. |
| 90 |
C ERRSEV = integer severity code. If > 12, error is |
| 91 |
C fatal. |
| 92 |
|
| 93 |
C CALLS -VDLOGE. |
| 94 |
|
| 95 |
C EXIT CONDITIONS - |
| 96 |
|
| 97 |
C NARRATIVE -An error will normally cause an error message to |
| 98 |
C be printed on the error output device and possible |
| 99 |
C termination of the program, unless a routine VBERRH |
| 100 |
C is supplied by the user. This routine will replace |
| 101 |
C the default VBERRH provided by the system. The |
| 102 |
C system supplied VBERRH calls VDLOGE before |
| 103 |
C returning. All versions of VBERRH, whether user- |
| 104 |
C supplied or default, must STOP on any error severity |
| 105 |
C greater than 12. |
| 106 |
|
| 107 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 108 |
|
| 109 |
INTEGER ERRNUM,ERRSEV |
| 110 |
|
| 111 |
C REPORT THE ERROR USING VDLOGE. |
| 112 |
CALL WPSTLE(ERRNUM,ERRSEV) |
| 113 |
|
| 114 |
C CHECK FOR FATAL ERROR. |
| 115 |
IF(ERRSEV.GT.12) STOP |
| 116 |
|
| 117 |
RETURN |
| 118 |
END |
| 119 |
SUBROUTINE WPSTGN(NAME) |
| 120 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 121 |
|
| 122 |
C VDGNAM -Name the graphics output file |
| 123 |
|
| 124 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 125 |
C Device-independent. |
| 126 |
|
| 127 |
C ENTRY CONDITIONS -NAME = character string; < 80 characters |
| 128 |
|
| 129 |
C CALLS |
| 130 |
|
| 131 |
C EXIT CONDITIONS -output graphics file is assigned the name NAME |
| 132 |
|
| 133 |
C NARRATIVE -This subroutine associates a file name with |
| 134 |
C the graphics output file (KOUTFL). If this |
| 135 |
C routine is not called, a system dependent |
| 136 |
C default name is used. VDGNAM must be called |
| 137 |
C before VDINIT. |
| 138 |
|
| 139 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 140 |
|
| 141 |
CHARACTER*(*) NAME |
| 142 |
INTEGER LENGTH,ISTART,IEND,I |
| 143 |
LENGTH = MIN(LEN(NAME),132) |
| 144 |
C Strip off any leading blanks |
| 145 |
ISTART = 0 |
| 146 |
DO 10 I=1,LENGTH |
| 147 |
IF(NAME(I:I) .NE. ' ')THEN |
| 148 |
ISTART = I |
| 149 |
GOTO 11 |
| 150 |
ENDIF |
| 151 |
10 CONTINUE |
| 152 |
11 CONTINUE |
| 153 |
C Strip off trailing blanks |
| 154 |
IEND = 0 |
| 155 |
IF(ISTART.GT.0)THEN |
| 156 |
DO 20 I=LENGTH,1,-1 |
| 157 |
IF(NAME(I:I) .NE. ' ')THEN |
| 158 |
IEND = I |
| 159 |
GOTO 21 |
| 160 |
ENDIF |
| 161 |
20 CONTINUE |
| 162 |
ENDIF |
| 163 |
21 CONTINUE |
| 164 |
IF(ISTART .GT. 0)THEN |
| 165 |
LENGTH = IEND-ISTART+1 |
| 166 |
CALL CDRGNM(NAME(ISTART:IEND),LENGTH) |
| 167 |
ENDIF |
| 168 |
RETURN |
| 169 |
END |
| 170 |
SUBROUTINE WPSTNT(ASPECT,JUSTIF) |
| 171 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 172 |
|
| 173 |
C VDINIT -Initialize SVDI. |
| 174 |
|
| 175 |
C R.W.Simons -08APR81 |
| 176 |
C 30SEP81 |
| 177 |
|
| 178 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 179 |
C Device-independent. |
| 180 |
|
| 181 |
C ENTRY CONDITIONS -ASPECT = real ratio of X dimension to Y dimension. |
| 182 |
C Range >0.0. Default: 0.0 (device dependent). |
| 183 |
C JUSTIF = integer justification of NDC space on the |
| 184 |
C device. Range 0-9. Default: 0 (device dependent). |
| 185 |
|
| 186 |
C CALLS -CDRJOB, VBERRH, VIINIT. |
| 187 |
|
| 188 |
C EXIT CONDITIONS -XNDCMX,YNDCMX = real NDC maximum valid values. |
| 189 |
C VECTOR = real array of default attribute values (all |
| 190 |
C device-dependent except VECTOR(4)=0.0). |
| 191 |
|
| 192 |
C NARRATIVE -This must be the first SVDI call made. All |
| 193 |
C attribute values, the color table, and current |
| 194 |
C position are set to appropriate defaults for the |
| 195 |
C device. All necessary input device initialization |
| 196 |
C is done. The screen is cleared or paper advanced |
| 197 |
C if necessary to guarantee a blank view surface for |
| 198 |
C drawing. |
| 199 |
|
| 200 |
C ASPECT specifies the ratio of the X dimension to the |
| 201 |
C Y dimension. Maximum NDC values (at least one of |
| 202 |
C which will be 1.0) are computed to give the ASPECT |
| 203 |
C specified. The default ASPECT (0.0) is device |
| 204 |
C dependent and equals the aspect ratio of the |
| 205 |
C physical device, except for variable aspect devices |
| 206 |
C (such as drum plotters) which are assigned a default |
| 207 |
C aspect of 1.0. The NDC rectangle is scaled until |
| 208 |
C one dimension fills the corresponding dimension of |
| 209 |
C the device. |
| 210 |
|
| 211 |
C JUSTIF determines where the rectangle is located on |
| 212 |
C the device as diagrammed below: |
| 213 |
C --------- |
| 214 |
C | 7 8 9 | |
| 215 |
C | 4 5 6 | |
| 216 |
C | 1 2 3 | |
| 217 |
C --------- |
| 218 |
C For example, JUSTIF = 7 indicates NDC space will be |
| 219 |
C upper left justified on the device. |
| 220 |
|
| 221 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 222 |
|
| 223 |
REAL ASPECT |
| 224 |
INTEGER JUSTIF |
| 225 |
|
| 226 |
INTEGER*4 MACHIN(3),MACLEN |
| 227 |
INTEGER*4 KIDSIZ,KJOBID(4),KUSRSZ,KUSRID(4),KSZROU |
| 228 |
INTEGER*4 KJROUT(4),KSECUR,KJTIME(4),KJDATE(4) |
| 229 |
COMMON / VCJOB/ KIDSIZ,KJOBID,KUSRSZ,KUSRID,KSZROU, |
| 230 |
1 KJROUT,KSECUR,KJTIME,KJDATE,MACHIN,MACLEN |
| 231 |
|
| 232 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VIINIT. |
| 233 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 234 |
CALL WPSTII(ASPECT,JUSTIF) |
| 235 |
|
| 236 |
RETURN |
| 237 |
END |
| 238 |
SUBROUTINE WPSTID(XNDC,YNDC) |
| 239 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 240 |
|
| 241 |
C VDIQND -Inquire NDC Space. |
| 242 |
|
| 243 |
C R.W.Simons -08APR81 |
| 244 |
|
| 245 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 246 |
C Device-independent. |
| 247 |
|
| 248 |
C ENTRY CONDITIONS -XNDCMX,YNDCMX = real maximum valid NDC values. |
| 249 |
|
| 250 |
C CALLS - |
| 251 |
|
| 252 |
C EXIT CONDITIONS -XNDC,YNDC = real maximum valid NDC values (XNDCMX, |
| 253 |
C YNDCMX). |
| 254 |
|
| 255 |
C NARRATIVE -Return the maximum NDC values as set to realize the |
| 256 |
C aspect defined by VDINIT. |
| 257 |
|
| 258 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 259 |
|
| 260 |
REAL XNDC,YNDC |
| 261 |
|
| 262 |
REAL XNDCMX,YNDCMX |
| 263 |
COMMON /WPST02/ XNDCMX,YNDCMX |
| 264 |
|
| 265 |
C RETURN THE MAXIMUM VALID NDC VALUES. |
| 266 |
XNDC=XNDCMX |
| 267 |
YNDC=YNDCMX |
| 268 |
|
| 269 |
RETURN |
| 270 |
END |
| 271 |
SUBROUTINE WPSTIO(ATTARR) |
| 272 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 273 |
|
| 274 |
C VDIQOS -Inquire Output Status (of Attributes). |
| 275 |
|
| 276 |
C K.M. ERICKSON -14 NOV 80 |
| 277 |
|
| 278 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 279 |
C Device-independent. |
| 280 |
|
| 281 |
C ENTRY CONDITIONS -VECTOR = real array of current attribute values. |
| 282 |
|
| 283 |
C CALLS - |
| 284 |
|
| 285 |
C EXIT CONDITIONS -ATTARR = real array of current attribute value |
| 286 |
C (VECTOR). |
| 287 |
|
| 288 |
C NARRATIVE -Return the current attribute values in ATTARR as |
| 289 |
C given below. |
| 290 |
C ATTARR(1)=Foreground Color |
| 291 |
C (2)=Background Color |
| 292 |
C (3)=Intensity |
| 293 |
C (4)=Line Style |
| 294 |
C (5)=Line Width |
| 295 |
C (6)=Character Box Y |
| 296 |
C (7)=Character Box X |
| 297 |
|
| 298 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 299 |
|
| 300 |
REAL ATTARR(7) |
| 301 |
|
| 302 |
REAL VECTOR(7) |
| 303 |
COMMON /WPST03/ VECTOR |
| 304 |
|
| 305 |
INTEGER I |
| 306 |
|
| 307 |
DO 100 I=1,7 |
| 308 |
ATTARR(I)=VECTOR(I) |
| 309 |
100 CONTINUE |
| 310 |
|
| 311 |
RETURN |
| 312 |
END |
| 313 |
SUBROUTINE WPSTLN(X,Y) |
| 314 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 315 |
|
| 316 |
C VDLINA -Line Absolute. |
| 317 |
|
| 318 |
C R.W.Simons -08APR81 |
| 319 |
|
| 320 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 321 |
C Device-independent. |
| 322 |
|
| 323 |
C ENTRY CONDITIONS -X,Y = real NDC position. |
| 324 |
|
| 325 |
C CALLS -VILINA. |
| 326 |
|
| 327 |
C EXIT CONDITIONS - |
| 328 |
|
| 329 |
C NARRATIVE -Draw a line from current position to absolute NDC |
| 330 |
C position X,Y and update current position. |
| 331 |
C Attributes foreground color, intensity, line style, |
| 332 |
C and line width apply. |
| 333 |
|
| 334 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 335 |
|
| 336 |
REAL X,Y |
| 337 |
|
| 338 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VILINA. |
| 339 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 340 |
CALL WPSTIL(X,Y) |
| 341 |
|
| 342 |
RETURN |
| 343 |
END |
| 344 |
SUBROUTINE WPSTLE(ERRNUM,ERRSEV) |
| 345 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 346 |
|
| 347 |
C VDLOGE -Log Error. |
| 348 |
|
| 349 |
C R.W.Simons -08APR81 |
| 350 |
C K.M.Erickson -8OCT84 - add buffer flush |
| 351 |
|
| 352 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 353 |
C Device-independent. |
| 354 |
|
| 355 |
C ENTRY CONDITIONS -ERRNUM = integer error number. |
| 356 |
C ERRSEV = integer error severity. |
| 357 |
|
| 358 |
C CALLS -CDRTBK, VDBUFL |
| 359 |
|
| 360 |
C EXIT CONDITIONS - |
| 361 |
|
| 362 |
C NARRATIVE -Report error with message to user and possibly |
| 363 |
C terminate job depending on severity. Notice that |
| 364 |
C by judicious use of the error routines (see VBERRH) |
| 365 |
C it is possible to write very "nice" error routines |
| 366 |
C that, for example, only report the first two |
| 367 |
C occurrences of a particular error, or terminate |
| 368 |
C if more than 10 errors of a particular severity |
| 369 |
C occur. |
| 370 |
|
| 371 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 372 |
|
| 373 |
INTEGER ERRNUM,ERRSEV |
| 374 |
|
| 375 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 376 |
1KCOMTP |
| 377 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 378 |
1 KBAUD,KCOMTP |
| 379 |
|
| 380 |
C flush buffer before we do a write |
| 381 |
CALL WPSTFL |
| 382 |
|
| 383 |
C WRITE THE ERROR TO THE LISTING. |
| 384 |
WRITE(KWRTFL,10)ERRNUM,ERRSEV |
| 385 |
10 FORMAT(' SVDI ERROR NUMBER ',I5,' SEVERITY CODE ',I5) |
| 386 |
|
| 387 |
C TRACEBACK. |
| 388 |
CALL CDRTBK |
| 389 |
|
| 390 |
RETURN |
| 391 |
END |
| 392 |
SUBROUTINE WPSTMO(ISTATE) |
| 393 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 394 |
|
| 395 |
C VDMONI -Logs Usage Information.. |
| 396 |
|
| 397 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 398 |
C Device-independent. |
| 399 |
|
| 400 |
C ENTRY CONDITIONS -ISTATE = 0 - initialization |
| 401 |
C 1 - new page |
| 402 |
C 2 - terminate |
| 403 |
|
| 404 |
C CALLS -CDRMON |
| 405 |
|
| 406 |
C EXIT CONDITIONS - |
| 407 |
|
| 408 |
c NARRATIVE -For ISTATE=0, job information is initialized, and |
| 409 |
C timers are initialized called by VIINIT. |
| 410 |
C ISTATE=1 will increment a common block page |
| 411 |
C counter called by VINWPG. |
| 412 |
C ISTATE=2 is called by VITERM and will cause |
| 413 |
C the collected usage monitoring information to |
| 414 |
C be written to a file. |
| 415 |
C Contains entry points VBPKG which will has |
| 416 |
C an 8 character parameter which will set a common |
| 417 |
C block variable specifying the package being used. |
| 418 |
C Entry point VBDEV has an 8 character parameter |
| 419 |
C which will set a common block variable specifying |
| 420 |
C the device being used. |
| 421 |
|
| 422 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 423 |
|
| 424 |
CHARACTER *8 C1,C2,MDEV,MPKG |
| 425 |
INTEGER ISTATE,MPAGES |
| 426 |
SAVE MDEV,MPKG,MPAGES |
| 427 |
DATA MPKG /' '/ |
| 428 |
DATA MDEV /' '/ |
| 429 |
DATA MPAGES /0/ |
| 430 |
|
| 431 |
IF(ISTATE.EQ.0) THEN |
| 432 |
CALL CDRELA(0) |
| 433 |
ELSEIF (ISTATE.EQ.1) THEN |
| 434 |
MPAGES=MPAGES+1 |
| 435 |
ELSE |
| 436 |
CALL CDRELA(1) |
| 437 |
CALL CDRMON(MDEV,MPKG,MPAGES) |
| 438 |
ENDIF |
| 439 |
RETURN |
| 440 |
C Usage Monitoring Information |
| 441 |
|
| 442 |
ENTRY WPSTPK (C1) |
| 443 |
MPKG = C1 |
| 444 |
RETURN |
| 445 |
ENTRY WPSTDV (C2) |
| 446 |
MDEV = C2 |
| 447 |
RETURN |
| 448 |
ENTRY WPSTQP(C1) |
| 449 |
C1 = MPKG |
| 450 |
RETURN |
| 451 |
ENTRY WPSTIV(C2) |
| 452 |
C2 = MDEV |
| 453 |
RETURN |
| 454 |
END |
| 455 |
SUBROUTINE WPSTMV(X,Y) |
| 456 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 457 |
|
| 458 |
C VDMOVA -Move Absolute. |
| 459 |
|
| 460 |
C R.W.Simons -08APR81 |
| 461 |
|
| 462 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 463 |
C Device-independent. |
| 464 |
|
| 465 |
C ENTRY CONDITIONS -X,Y = real NDC position. |
| 466 |
|
| 467 |
C CALLS -VIMOVA |
| 468 |
|
| 469 |
C EXIT CONDITIONS - |
| 470 |
|
| 471 |
C NARRATIVE -Set current position to absolute NDC position X,Y. |
| 472 |
|
| 473 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 474 |
|
| 475 |
REAL X,Y |
| 476 |
|
| 477 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VIMOVA. |
| 478 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 479 |
CALL WPSTIM(X,Y) |
| 480 |
|
| 481 |
RETURN |
| 482 |
END |
| 483 |
SUBROUTINE WPSTPG |
| 484 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 485 |
|
| 486 |
C VDNWPG -New Page. |
| 487 |
|
| 488 |
C R.W.Simons -08APR81 |
| 489 |
|
| 490 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 491 |
C Device-independent. |
| 492 |
|
| 493 |
C ENTRY CONDITIONS - |
| 494 |
|
| 495 |
C CALLS -VINWPG. |
| 496 |
|
| 497 |
C EXIT CONDITIONS - |
| 498 |
|
| 499 |
C NARRATIVE -Physically advance the medium or clear the screen, |
| 500 |
C whichever is appropriate. Also flood the screen |
| 501 |
C with the background color on devices that support |
| 502 |
C this function. The current position is not changed. |
| 503 |
|
| 504 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 505 |
|
| 506 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VINWPG. |
| 507 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 508 |
CALL WPSTIG |
| 509 |
|
| 510 |
RETURN |
| 511 |
END |
| 512 |
SUBROUTINE WPSTPT(X,Y) |
| 513 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 514 |
|
| 515 |
C VDPNTA -Point Absolute. |
| 516 |
|
| 517 |
C R.W.Simons -08APR81 |
| 518 |
|
| 519 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 520 |
C Device-independent. |
| 521 |
|
| 522 |
C ENTRY CONDITIONS -X,Y = real NDC position. |
| 523 |
|
| 524 |
C CALLS -VIPNTA. |
| 525 |
|
| 526 |
C EXIT CONDITIONS - |
| 527 |
|
| 528 |
C NARRATIVE -Set current position to absolute NDC position X,Y |
| 529 |
C and put a visible point there. Attributes |
| 530 |
C foreground color and intensity apply. |
| 531 |
|
| 532 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 533 |
|
| 534 |
REAL X,Y |
| 535 |
|
| 536 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VIPNTA. |
| 537 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 538 |
CALL WPSTIP(X,Y) |
| 539 |
|
| 540 |
RETURN |
| 541 |
END |
| 542 |
SUBROUTINE WPSTPY(XARRAY,YARRAY,NPTS) |
| 543 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 544 |
|
| 545 |
C VDPOLY -POLYGON FILL ROUTINE |
| 546 |
|
| 547 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 548 |
|
| 549 |
C ENTRY CONDITIONS -XARRAY-ARRAY OF X VALUES OF THE POLYGON |
| 550 |
C YARRAY-CORRESPONDING ARRAY OF Y VALUES |
| 551 |
C NPTS- NUMBER OF POINTS IN (XARRAY,YARRAY) |
| 552 |
|
| 553 |
C CALLS -VIPOLY |
| 554 |
|
| 555 |
C EXIT CONDITIONS - |
| 556 |
|
| 557 |
C NARRATIVE -The polygon defined by XARRAY,YARRAY will be drawn |
| 558 |
C and filled (constrained by any limitations of the |
| 559 |
C physical device -- see below). No checking will be |
| 560 |
C done -- all points will be passed to the device. |
| 561 |
C Current foreground color is used and the polygon |
| 562 |
C boundary is drawn using the solid line style. |
| 563 |
C VDI will close the polygon (i.e. the last point |
| 564 |
C will be connected to the first). |
| 565 |
|
| 566 |
C The level of support for this primitive is device- |
| 567 |
C dependent. The level of support is categorized |
| 568 |
C as follows: |
| 569 |
|
| 570 |
C Level 0 -- no polygon fill. Only the polygon |
| 571 |
C boundary is drawn. |
| 572 |
C Level 1 -- the device fills convex polygons. |
| 573 |
C Level 2 -- the device fills simple polygons (may |
| 574 |
C be concave but not self-crossing) |
| 575 |
C Level 3 -- full support for complex polygons (may |
| 576 |
C be self-crossing). In general, the interior of |
| 577 |
C a complex polygon is defined by the set of points |
| 578 |
C such that, for each point, when an imaginary line |
| 579 |
C is drawn to that point from a point far outside |
| 580 |
C the polygon, that line intersects the polygon |
| 581 |
C boundary an odd number of times. |
| 582 |
|
| 583 |
C Note that the level of support for a particular device |
| 584 |
C can be inquired using the function VDIQDC. |
| 585 |
|
| 586 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 587 |
|
| 588 |
INTEGER NPTS |
| 589 |
REAL XARRAY(NPTS),YARRAY(NPTS) |
| 590 |
|
| 591 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VIPOLY. |
| 592 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 593 |
CALL WPST10(XARRAY,YARRAY,NPTS) |
| 594 |
|
| 595 |
RETURN |
| 596 |
END |
| 597 |
SUBROUTINE WPSTOS(ATTARR) |
| 598 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 599 |
|
| 600 |
C VDSTOS -Set Output Status (of Attributes). |
| 601 |
|
| 602 |
C K.M. ERICKSON -14 NOV 80 |
| 603 |
|
| 604 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 605 |
C Device-independent. |
| 606 |
|
| 607 |
C ENTRY CONDITIONS -ATTARR = real array of attribute values. |
| 608 |
|
| 609 |
C CALLS -VDSTBC,VDSTCS,VDSTFC,VDSTIN,VDSTLS,VDSTLW |
| 610 |
|
| 611 |
C EXIT CONDITIONS -VECTOR = real updated attribute values (ATTARR). |
| 612 |
|
| 613 |
C NARRATIVE -Set the attribute values from ATTARR as given below. |
| 614 |
C ATTARR(1)=Foreground Color |
| 615 |
C (2)=Background Color |
| 616 |
C (3)=Intensity |
| 617 |
C (4)=Line Style |
| 618 |
C (5)=Line Width |
| 619 |
C (6)=Character Box Y |
| 620 |
|
| 621 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 622 |
|
| 623 |
REAL ATTARR(6) |
| 624 |
|
| 625 |
REAL VECTOR(7) |
| 626 |
COMMON /WPST03/ VECTOR |
| 627 |
|
| 628 |
C CALL EACH OF THE INDIVIDUAL ATTRIBUTE SETTING ROUTINES. |
| 629 |
C CHECK FOR VALIDITY OF INPUT VALUES WILL BE DONE IN EACH INDIVIDUAL |
| 630 |
C ROUTINE. |
| 631 |
CALL WPSTFC(INT(ATTARR(1))) |
| 632 |
CALL WPSTBC(INT(ATTARR(2))) |
| 633 |
CALL WPSTIN(ATTARR(3)) |
| 634 |
CALL WPSTLS(INT(ATTARR(4))) |
| 635 |
CALL WPSTLW(ATTARR(5)) |
| 636 |
CALL WPSTCS(ATTARR(6)) |
| 637 |
|
| 638 |
RETURN |
| 639 |
END |
| 640 |
SUBROUTINE WPSTTR |
| 641 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 642 |
|
| 643 |
C VDTERM -Terminate SVDI. |
| 644 |
|
| 645 |
C R.W.Simons -08APR81 |
| 646 |
|
| 647 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 648 |
C Device-independent. |
| 649 |
|
| 650 |
C ENTRY CONDITIONS - |
| 651 |
|
| 652 |
C CALLS -VITERM. |
| 653 |
|
| 654 |
C EXIT CONDITIONS - |
| 655 |
|
| 656 |
C NARRATIVE -Terminate the SVDI by flushing buffers, etc. This |
| 657 |
C should be the last SVDI call made. |
| 658 |
|
| 659 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 660 |
|
| 661 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VITERM. |
| 662 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY MARKINGS TO SVDI. |
| 663 |
CALL WPSTIT |
| 664 |
|
| 665 |
RETURN |
| 666 |
END |
| 667 |
SUBROUTINE WPSTTX(LENGTH,CHARS) |
| 668 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 669 |
|
| 670 |
C VDTEXT -Text from Array. |
| 671 |
|
| 672 |
C R.W.Simons -08APR81 |
| 673 |
|
| 674 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 675 |
C Device-independent. |
| 676 |
|
| 677 |
C ENTRY CONDITIONS -LENGTH = integer number of characters in CHARS. |
| 678 |
C Range 1-136. |
| 679 |
C CHARS = integer array of ASCII characters, one |
| 680 |
C character per array element, right justified. |
| 681 |
C Range 8,10,32-126. |
| 682 |
|
| 683 |
C CALLS -VITEXT. |
| 684 |
|
| 685 |
C EXIT CONDITIONS - |
| 686 |
|
| 687 |
C NARRATIVE -Draw LENGTH characters in CHARS, starting at |
| 688 |
C current position and update current position to |
| 689 |
C the point after the last character box where the |
| 690 |
C next character would begin. Current position |
| 691 |
C indicates the lower left corner of the first |
| 692 |
C character box. Only printable characters (32-126 |
| 693 |
C decimal) and backspace and linefeed are allowed. |
| 694 |
C All values in this range must produce "reasonable" |
| 695 |
C output; mapping lower; case to upper case letters is |
| 696 |
C considered reasonable. Attributes foreground color, |
| 697 |
C background color, intensity, and character size |
| 698 |
C apply. |
| 699 |
|
| 700 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 701 |
|
| 702 |
INTEGER LENGTH,CHARS(136) |
| 703 |
|
| 704 |
C THIS IS JUST A DUMMY ROUTINE WHICH DOES NOTHING BUT CALL VITEXT. |
| 705 |
C THIS ORGANIZATION FACILITATES ADDING SECURITY NARKINGS TO SVDI. |
| 706 |
CALL WPSTIX(LENGTH,CHARS) |
| 707 |
|
| 708 |
RETURN |
| 709 |
END |
| 710 |
SUBROUTINE WPSTFR(ITYPE) |
| 711 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 712 |
|
| 713 |
C VDFRAM - Draw header or trailer frame |
| 714 |
|
| 715 |
C P. Watterberg - 27 Aug 81 |
| 716 |
|
| 717 |
C ENVIRONMENT -Computer-independent, system-independent, FORTRAN 77 |
| 718 |
|
| 719 |
C ENTRY CONDITIONS - ITYPE = 0 for header frame |
| 720 |
C = 1 for trailer frame |
| 721 |
|
| 722 |
C CALLS - VIFRAM |
| 723 |
|
| 724 |
C EXIT CONDITIONS - |
| 725 |
|
| 726 |
C NARRATIVE - Calls vifram to get time and date from the |
| 727 |
c system via the computer-dependent routine CDRTOD(entry |
| 728 |
c point in CDRJOB) and writes it on an identification frame. |
| 729 |
|
| 730 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 731 |
|
| 732 |
INTEGER ITYPE |
| 733 |
|
| 734 |
CALL WPST04(ITYPE) |
| 735 |
RETURN |
| 736 |
END |
| 737 |
SUBROUTINE WPST04(ITYPE) |
| 738 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 739 |
|
| 740 |
C VIFRAM - Draw header or trailer frame |
| 741 |
|
| 742 |
C P. Watterberg - 27 Aug 81 |
| 743 |
|
| 744 |
C ENVIRONMENT -Computer-independent, system-independent, FORTRAN 77 |
| 745 |
|
| 746 |
C ENTRY CONDITIONS - ITYPE = 0 for header frame |
| 747 |
C = 1 for trailer frame |
| 748 |
|
| 749 |
C CALLS - |
| 750 |
|
| 751 |
C EXIT CONDITIONS - |
| 752 |
|
| 753 |
C NARRATIVE -NULL ROUTINE |
| 754 |
|
| 755 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 756 |
|
| 757 |
INTEGER ITYPE |
| 758 |
|
| 759 |
RETURN |
| 760 |
END |
| 761 |
SUBROUTINE WPSTBU(BTNNUM) |
| 762 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 763 |
|
| 764 |
C VDAABU -Await Any Button. |
| 765 |
|
| 766 |
C R.W.Simons -08APR81 |
| 767 |
|
| 768 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 769 |
C All Batch Devices. |
| 770 |
|
| 771 |
C ENTRY CONDITIONS - |
| 772 |
|
| 773 |
C CALLS - |
| 774 |
|
| 775 |
C EXIT CONDITIONS -BTNNUM = integer number of the button pressed. |
| 776 |
C Range 1 to a device dependent maximum which must be |
| 777 |
C at least 8. |
| 778 |
|
| 779 |
C NARRATIVE -When a button has been pressed, its integer button |
| 780 |
C number is returned in BTNNUM. This function flushes |
| 781 |
C the button buffer, if any. This function flushes |
| 782 |
C the output buffers before doing input. |
| 783 |
|
| 784 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 785 |
|
| 786 |
INTEGER BTNNUM |
| 787 |
|
| 788 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 789 |
1KCOMTP |
| 790 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 791 |
1 KBAUD,KCOMTP |
| 792 |
|
| 793 |
C BATCH DEVICES DON'T NEED TO FLUSH BUFFERS. |
| 794 |
|
| 795 |
C READ A RECORD FROM COMPUTER DEPENDENT FILE KINFL IN I5 FORMAT. |
| 796 |
READ(KINFL,10) BTNNUM |
| 797 |
10 FORMAT(I5) |
| 798 |
|
| 799 |
C CHECK FOR VALID BTNNUM. |
| 800 |
C RANGE FOR BATCH DEVICES IS 1-99999. IF OUT OF RANGE, MAP IT BACK IN: |
| 801 |
C MAPPING (-1)-(-9999) TO 1-9999 AND MAPPING 0 TO 10000. |
| 802 |
IF(BTNNUM.LT.0) BTNNUM=-BTNNUM |
| 803 |
IF(BTNNUM.EQ.0) BTNNUM=10000 |
| 804 |
|
| 805 |
RETURN |
| 806 |
END |
| 807 |
SUBROUTINE WPSTBL(BTNNUM,X,Y) |
| 808 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 809 |
|
| 810 |
C VDABGL -Await Button, Get Locator. |
| 811 |
|
| 812 |
C R.W.Simons -08APR81 |
| 813 |
|
| 814 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 815 |
C All Batch Devices. |
| 816 |
|
| 817 |
C ENTRY CONDITIONS - |
| 818 |
|
| 819 |
C CALLS - |
| 820 |
|
| 821 |
C EXIT CONDITIONS -BTNNUM = integer number of the button pressed. |
| 822 |
C Range 1 to a device dependent maximum that must be |
| 823 |
C at least 8. |
| 824 |
C X,Y = real NDC position of the locator. |
| 825 |
|
| 826 |
C NARRATIVE -Wait until a button is hit, then return the number |
| 827 |
C of the button in BTNNUM and the NDC value of the |
| 828 |
C locator in X,Y. This function flushes the output |
| 829 |
C buffers before doing input. |
| 830 |
|
| 831 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 832 |
|
| 833 |
REAL X,Y |
| 834 |
INTEGER BTNNUM |
| 835 |
|
| 836 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 837 |
1KCOMTP |
| 838 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 839 |
1 KBAUD,KCOMTP |
| 840 |
|
| 841 |
C BATCH DEVICES DON'T NEED TO FLUSH BUFFERS. |
| 842 |
|
| 843 |
C READ A RECORD FROM COMPUTER DEPENDENT FILE KINFL IN I5,2F10.7 FORMAT. |
| 844 |
READ(KINFL,10) BTNNUM,X,Y |
| 845 |
10 FORMAT(I5,2F10.7) |
| 846 |
|
| 847 |
C CHECK FOR VALID BTNNUM. |
| 848 |
C RANGE FOR BATCH DEVICES IS 1-99999. IF OUT OF RANGE, MAP IT BACK IN: |
| 849 |
C MAPPING (-1)-(-9999) TO 1-9999 AND MAPPING 0 TO 10000. |
| 850 |
IF(BTNNUM.LT.0) BTNNUM=-BTNNUM |
| 851 |
IF(BTNNUM.EQ.0) BTNNUM=10000 |
| 852 |
|
| 853 |
RETURN |
| 854 |
END |
| 855 |
SUBROUTINE WPSTKL(CHAR,X,Y) |
| 856 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 857 |
|
| 858 |
C VDAKGL -Await Keyboard, Get Locator. |
| 859 |
|
| 860 |
C R.W.SIMONS -02DEC80 |
| 861 |
|
| 862 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 863 |
C All Batch Devices. |
| 864 |
|
| 865 |
C ENTRY CONDITIONS - |
| 866 |
|
| 867 |
C CALLS - |
| 868 |
|
| 869 |
C EXIT CONDITIONS -CHAR = integer ASCII character input from the |
| 870 |
C keyboard, right-justified, zero fill. Range 32-126. |
| 871 |
C X,Y = real NDC position of the locator. |
| 872 |
|
| 873 |
C NARRATIVE -Wait until a key is hit, then return the character |
| 874 |
C entered in CHAR and the NDC value of the locator |
| 875 |
C in X,Y. If the character entered does not fall in |
| 876 |
C the range 32-126, a blank(32) is returned in CHAR. |
| 877 |
C This function flushes the output buffers before |
| 878 |
C doing input. |
| 879 |
|
| 880 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 881 |
|
| 882 |
REAL X,Y |
| 883 |
INTEGER CHAR |
| 884 |
|
| 885 |
INTEGER IN,CHR |
| 886 |
|
| 887 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 888 |
1KCOMTP |
| 889 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 890 |
1 KBAUD,KCOMTP |
| 891 |
|
| 892 |
C BATCH DEVICES DON'T NEED TO FLUSH BUFFERS. |
| 893 |
|
| 894 |
C READ A CHARACTER AND AN X,Y POSITION FROM COMPUTER DEPENDENT FILE |
| 895 |
C KINFL WITH FORMAT A1,2F10.7. |
| 896 |
READ(KINFL,10) CHR,X,Y |
| 897 |
10 FORMAT(A1,2F10.7) |
| 898 |
|
| 899 |
C CONVERT CHARACTER TO INTEGER ASCII AND CHECK FOR VALID RANGE. |
| 900 |
CALL CDR1CH(1,CHR,IN) |
| 901 |
CALL CDRCVT(IN,CHAR) |
| 902 |
IF(CHAR.LT.32.OR.CHAR.GT.126) CHAR=32 |
| 903 |
|
| 904 |
RETURN |
| 905 |
END |
| 906 |
SUBROUTINE WPSTLO(X,Y) |
| 907 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 908 |
|
| 909 |
C VDALOC -Await Locator. |
| 910 |
|
| 911 |
C R.W.Simons -08APR81 |
| 912 |
|
| 913 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 914 |
C All Batch Devices. |
| 915 |
|
| 916 |
C ENTRY CONDITIONS - |
| 917 |
|
| 918 |
C CALLS - |
| 919 |
|
| 920 |
C EXIT CONDITIONS -X,Y = real NDC position of the locator. |
| 921 |
|
| 922 |
C NARRATIVE -Wait until the locator is positioned, then return |
| 923 |
C the NDC value of the locator in X,Y. The fact that |
| 924 |
C the locator is positioned can be signaled in a |
| 925 |
C variety of device dependent ways, such as clicking |
| 926 |
C the switch in a tablet pen, hitting a button, or |
| 927 |
C hitting a key on the keyboard. Any information |
| 928 |
C contained in this signal is ignored by this |
| 929 |
C function, as only the locator position is returned. |
| 930 |
C This function flushes the output buffers before |
| 931 |
C doing input. |
| 932 |
|
| 933 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 934 |
|
| 935 |
REAL X,Y |
| 936 |
|
| 937 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 938 |
1KCOMTP |
| 939 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 940 |
1 KBAUD,KCOMTP |
| 941 |
|
| 942 |
C BATCH DEVICES DON'T NEED TO FLUSH BUFFERS. |
| 943 |
|
| 944 |
C READ AN X,Y POSITION FROM COMPUTER DEPENDENT FILE |
| 945 |
C KINFL WITH FORMAT 2F10.7. |
| 946 |
READ(KINFL,10) X,Y |
| 947 |
10 FORMAT(2F10.7) |
| 948 |
|
| 949 |
RETURN |
| 950 |
END |
| 951 |
SUBROUTINE WPSTBE |
| 952 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 953 |
|
| 954 |
C VDBELL -Ring Bell |
| 955 |
|
| 956 |
C R.W.SIMONS -02DEC80 |
| 957 |
|
| 958 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 959 |
C All Batch Devices. |
| 960 |
|
| 961 |
C ENTRY CONDITIONS - |
| 962 |
|
| 963 |
C CALLS - |
| 964 |
|
| 965 |
C EXIT CONDITIONS - |
| 966 |
|
| 967 |
C NARRATIVE -Ring user's bell to get his attention. This |
| 968 |
C function is ignored by batch devices. |
| 969 |
|
| 970 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 971 |
|
| 972 |
C THIS FUNCTION IS IGNORED BY BATCH DEVICES. |
| 973 |
|
| 974 |
RETURN |
| 975 |
END |
| 976 |
SUBROUTINE WPSTFL |
| 977 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 978 |
|
| 979 |
C VDBUFL -Buffer Flush. |
| 980 |
|
| 981 |
C R.W.Simons -19DEC80 |
| 982 |
|
| 983 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 984 |
C All Batch Devices. |
| 985 |
|
| 986 |
C ENTRY CONDITIONS - |
| 987 |
|
| 988 |
C CALLS - |
| 989 |
|
| 990 |
C EXIT CONDITIONS - |
| 991 |
|
| 992 |
C NARRATIVE -Assure that the picture is up-to-date by flushing |
| 993 |
C buffers if necessary. Also prepare the device to |
| 994 |
C operate in alphanumeric (as opposed to graphic) |
| 995 |
C mode. This is necessary on some devices so that |
| 996 |
C alphanumeric data from FORTRAN I/O won't be |
| 997 |
C misinterpreted as graphic data. |
| 998 |
|
| 999 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1000 |
|
| 1001 |
C THIS FUNCTION IS IGNORED BY BATCH DEVICES. |
| 1002 |
|
| 1003 |
RETURN |
| 1004 |
END |
| 1005 |
SUBROUTINE WPSTLA(LOCX,LOCY) |
| 1006 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1007 |
|
| 1008 |
C VDSTLA -Set Initial Locator Position. |
| 1009 |
|
| 1010 |
C R.W.Simons -08APR81 |
| 1011 |
|
| 1012 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1013 |
C All Batch Devices. |
| 1014 |
|
| 1015 |
C ENTRY CONDITIONS -LOCX,LOCY = real NDC position that the locator is |
| 1016 |
C initialized to. |
| 1017 |
|
| 1018 |
C CALLS - |
| 1019 |
|
| 1020 |
C EXIT CONDITIONS - |
| 1021 |
|
| 1022 |
C NARRATIVE -Set the initial locator position (light pen tracking |
| 1023 |
C cross, for example) each time this function is |
| 1024 |
C called. |
| 1025 |
|
| 1026 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1027 |
|
| 1028 |
REAL LOCX,LOCY |
| 1029 |
|
| 1030 |
C BATCH DEVICES IGNORE THIS FUNCTION. |
| 1031 |
|
| 1032 |
RETURN |
| 1033 |
END |
| 1034 |
SUBROUTINE WPSTWT |
| 1035 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1036 |
|
| 1037 |
C VDWAIT -Wait for User. |
| 1038 |
|
| 1039 |
C R.W.SIMONS -02DEC80 |
| 1040 |
|
| 1041 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1042 |
C All Batch Devices. |
| 1043 |
|
| 1044 |
C ENTRY CONDITIONS - |
| 1045 |
|
| 1046 |
C CALLS - |
| 1047 |
|
| 1048 |
C EXIT CONDITIONS - |
| 1049 |
|
| 1050 |
C NARRATIVE -Wait for the user to view the screen and signal he |
| 1051 |
C is done, normally by hitting any key. This function |
| 1052 |
C flushes the output buffers before doing input. |
| 1053 |
|
| 1054 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1055 |
|
| 1056 |
C BATCH DEVICES IGNORE THIS COMMAND. |
| 1057 |
|
| 1058 |
RETURN |
| 1059 |
END |
| 1060 |
SUBROUTINE WPSTIC(NUM,INDEX,CLRARY,CLRMOD) |
| 1061 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1062 |
|
| 1063 |
C VDIQCO -Inquire Color Table. |
| 1064 |
|
| 1065 |
C R.W.Simons -08APR81 |
| 1066 |
C H. S. LAUSON 29MAY86 - changed for current HLS interpretation |
| 1067 |
|
| 1068 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1069 |
C All Black and White Devices. (LXY, HC1, ALP) |
| 1070 |
|
| 1071 |
C ENTRY CONDITIONS -NUM = integer number of color indexes to inquire. |
| 1072 |
C Range 1-256. |
| 1073 |
C INDEX = integer array of indexes to inquire. Range |
| 1074 |
C 0-255. |
| 1075 |
C CLRMOD = integer color model to be used. Range 0,1. |
| 1076 |
|
| 1077 |
C CALLS -VBERRH |
| 1078 |
|
| 1079 |
C EXIT CONDITIONS -CLRARY = real array of 3 by NUM elements returning |
| 1080 |
C the values of the components of the indexes inquired. |
| 1081 |
C Range for RGB: red 0.0-1.0 |
| 1082 |
C green 0.0-1.0 |
| 1083 |
C blue 0.0-1.0 |
| 1084 |
C Range for HLS: hue 0.0-360.0 |
| 1085 |
C lightness 0.0-1.0 |
| 1086 |
C saturation 0.0-1.0 |
| 1087 |
|
| 1088 |
C NARRATIVE -Inquire one or more color table entries. NUM and |
| 1089 |
C INDEX specify how many and which indexes are being |
| 1090 |
C inquired. CLRMOD specifies which color model |
| 1091 |
C (0=RGB, 1=HLS) should be used in constructing values |
| 1092 |
C to return in CLRARY. A device which does not |
| 1093 |
C support a color table index specified will |
| 1094 |
C return -1.0 in the first element of the CLRARY value |
| 1095 |
C for that index. |
| 1096 |
|
| 1097 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1098 |
|
| 1099 |
INTEGER NUM,INDEX(NUM),CLRMOD |
| 1100 |
REAL CLRARY(3,NUM) |
| 1101 |
|
| 1102 |
C CHECK FOR VALID NUM. |
| 1103 |
IF(NUM.LT.1.OR.NUM.GT.256) THEN |
| 1104 |
CALL WPSTER(723,5) |
| 1105 |
GOTO 999 |
| 1106 |
END IF |
| 1107 |
|
| 1108 |
C CHECK FOR VALID CLRMOD. |
| 1109 |
IF(CLRMOD.NE.0.AND.CLRMOD.NE.1) THEN |
| 1110 |
CALL WPSTER(725,5) |
| 1111 |
GOTO 999 |
| 1112 |
END IF |
| 1113 |
|
| 1114 |
C CHECK FOR VALID INDEXES. |
| 1115 |
DO 100 I=1,NUM |
| 1116 |
INDEXN=INDEX(I) |
| 1117 |
IF(INDEXN.LT.0.OR.INDEXN.GT.255) THEN |
| 1118 |
CALL WPSTER(724,5) |
| 1119 |
GOTO 100 |
| 1120 |
END IF |
| 1121 |
IF(INDEXN.EQ.0) THEN |
| 1122 |
C INDEX 0 IS ALWAYS BLACK |
| 1123 |
IF (CLRMOD.EQ.0) THEN |
| 1124 |
CLRARY(1,I)=0.0 |
| 1125 |
ELSE |
| 1126 |
CLRARY(1,I)=120. |
| 1127 |
ENDIF |
| 1128 |
CLRARY(2,I)=0.0 |
| 1129 |
CLRARY(3,I)=0.0 |
| 1130 |
ELSE IF(INDEXN.EQ.7) THEN |
| 1131 |
C INDEX 7 IS ALWAYS WHITE |
| 1132 |
IF (CLRMOD.EQ.0) THEN |
| 1133 |
CLRARY(1,I)=1.0 |
| 1134 |
CLRARY(3,I)=1.0 |
| 1135 |
ELSE |
| 1136 |
CLRARY(1,I)=120. |
| 1137 |
CLRARY(3,I)=0.0 |
| 1138 |
ENDIF |
| 1139 |
CLRARY(2,I)=1.0 |
| 1140 |
ELSE |
| 1141 |
C NO OTHER INDEXES ARE SUPPORTED. |
| 1142 |
CLRARY(1,I)=-1.0 |
| 1143 |
END IF |
| 1144 |
100 CONTINUE |
| 1145 |
|
| 1146 |
999 RETURN |
| 1147 |
END |
| 1148 |
SUBROUTINE WPSTCP(X,Y) |
| 1149 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1150 |
|
| 1151 |
C VDIQCP -Inquire Where Current Position Is. |
| 1152 |
|
| 1153 |
C R.W.Simons -02DEC80 |
| 1154 |
|
| 1155 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1156 |
C All Devices that support a software CP. |
| 1157 |
C (AP5,GER,H50,HC1,HCB,HPP,I10,I30,LXY,QCR,QMS,XYN) |
| 1158 |
|
| 1159 |
C ENTRY CONDITIONS - |
| 1160 |
|
| 1161 |
C CALLS - |
| 1162 |
|
| 1163 |
C EXIT CONDITIONS -X,Y = real NDC position. |
| 1164 |
|
| 1165 |
C NARRATIVE -Return the value of current position. |
| 1166 |
|
| 1167 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1168 |
|
| 1169 |
REAL XCP,YCP |
| 1170 |
COMMON /WPST05/ XCP,YCP |
| 1171 |
|
| 1172 |
C ASSIGN THE CP TO X,Y. |
| 1173 |
X=XCP |
| 1174 |
Y=YCP |
| 1175 |
|
| 1176 |
RETURN |
| 1177 |
END |
| 1178 |
SUBROUTINE WPSTBC(COLOR) |
| 1179 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1180 |
|
| 1181 |
C VDSTBC -Set Background Color. |
| 1182 |
|
| 1183 |
C R.W.Simons -05DEC80 |
| 1184 |
|
| 1185 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1186 |
C All Devices with a constant white background. (LXY, |
| 1187 |
C HC1, ALP) |
| 1188 |
|
| 1189 |
C ENTRY CONDITIONS -COLOR = integer color table index. Range 0-255. |
| 1190 |
C Default: device dependent, in range 0-7. |
| 1191 |
|
| 1192 |
C CALLS -VBERRH |
| 1193 |
|
| 1194 |
C EXIT CONDITIONS -VECTOR(2) = real updated background color (COLOR). |
| 1195 |
|
| 1196 |
C NARRATIVE -Set the background color for following VDNWPG or |
| 1197 |
C TEXT primitives for devices supporting these |
| 1198 |
C features. For example, many raster devices support |
| 1199 |
C both an overall background color and a background |
| 1200 |
C for character drawing(e.g.,red letters on a green |
| 1201 |
C box). |
| 1202 |
C All devices must support at least a single device |
| 1203 |
C dependent value in the range 0-7. |
| 1204 |
C If an unsupported value is specified, set to |
| 1205 |
C default. |
| 1206 |
|
| 1207 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1208 |
|
| 1209 |
INTEGER COLOR |
| 1210 |
|
| 1211 |
REAL VECTOR(7) |
| 1212 |
COMMON /WPST03/ VECTOR |
| 1213 |
|
| 1214 |
C CHECK FOR VALID COLOR. |
| 1215 |
IF(COLOR.LT.0.OR.COLOR.GT.255) THEN |
| 1216 |
CALL WPSTER(724,5) |
| 1217 |
GOTO 999 |
| 1218 |
END IF |
| 1219 |
|
| 1220 |
C ONLY THE SINGLE BACKGROUND COLOR 7 (WHITE) IS SUPPORTED, |
| 1221 |
C SO NO ACTION IS NECESSARY. |
| 1222 |
|
| 1223 |
999 RETURN |
| 1224 |
END |
| 1225 |
SUBROUTINE WPSTCO(NUM,INDEX,CLRARY,CLRMOD) |
| 1226 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1227 |
|
| 1228 |
C VDSTCO -Set Color Table. |
| 1229 |
|
| 1230 |
C R.W.SIMONS -02DEC80 |
| 1231 |
|
| 1232 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1233 |
C All Black and White Devices. (LXY, HC1, ALP) |
| 1234 |
|
| 1235 |
C ENTRY CONDITIONS -NUM = integer number of color indexes to be set. |
| 1236 |
C Range 1-256. |
| 1237 |
C INDEX = integer array of indexes to be set. Range |
| 1238 |
C 0-255. |
| 1239 |
C CLRARY = real array of 3 by NUM elements specifying |
| 1240 |
C the values of the components of the index to be |
| 1241 |
C set. |
| 1242 |
C Range for RGB: red 0.0-1.0 |
| 1243 |
C green 0.0-1.0 |
| 1244 |
C blue 0.0-1.0 |
| 1245 |
C Range for HLS: hue 0.0-360.0 |
| 1246 |
C lightness 0.0-1.0 |
| 1247 |
C saturation 0.0-1.0 |
| 1248 |
C Default: |
| 1249 |
C Index Color RGB Values |
| 1250 |
C 0 black 0.,0.,0. |
| 1251 |
C 1 red 1.,0.,0. |
| 1252 |
C 2 green 0.,1.,0. |
| 1253 |
C 3 yellow 1.,1.,0. |
| 1254 |
C 4 blue 0.,0.,1. |
| 1255 |
C 5 magenta 1.,0.,1. |
| 1256 |
C 6 cyan 0.,1.,1. |
| 1257 |
C 7 white 1.,1.,1. |
| 1258 |
C CLRMOD = integer color model being used. Range 0,1. |
| 1259 |
C Default: 0 (RGB). |
| 1260 |
|
| 1261 |
C CALLS -VBERRH |
| 1262 |
|
| 1263 |
C EXIT CONDITIONS - |
| 1264 |
|
| 1265 |
C NARRATIVE -Set one or more color table entries. This is a |
| 1266 |
C dynamic setting, if the device will support it. |
| 1267 |
C "Dynamic" neans that primitives which have already |
| 1268 |
C been drawn will change their appearance when a |
| 1269 |
C dynamic setting is changed. INDEX is the |
| 1270 |
C position (or array of positions) in the table |
| 1271 |
C (0-255). CLRARY is a three-element vector (or 3 by |
| 1272 |
C NUM array) with the fractions (0.-1.) of RGB or |
| 1273 |
C values (0.0-360.0, 0.0-1.0, 0.0-1.0) of HLS. |
| 1274 |
C A translator for HLS to RGB will be used from |
| 1275 |
C GSPC79. CLRMOD specifies which color model is being |
| 1276 |
C used (0=RGB, 1=HLS). |
| 1277 |
C All devices must support at least a single device |
| 1278 |
C dependent value for each of red, green, and blue and |
| 1279 |
C the corresponding values for hue, lightness, and |
| 1280 |
C saturation. If unsupported values are specified, |
| 1281 |
C set to the closest supported values. |
| 1282 |
C All devices must support both RGB and HLS color |
| 1283 |
C models. |
| 1284 |
C All devices must support at least a single device |
| 1285 |
C dependent INDEX value in the range 0-7. If an |
| 1286 |
C unsupported value is specified, it should be ignored. |
| 1287 |
|
| 1288 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1289 |
|
| 1290 |
INTEGER NUM,INDEX(NUM),CLRMOD |
| 1291 |
REAL CLRARY(3,NUM) |
| 1292 |
|
| 1293 |
C CHECK FOR VALID NUM. |
| 1294 |
IF(NUM.LT.1.OR.NUM.GT.256) THEN |
| 1295 |
CALL WPSTER(723,5) |
| 1296 |
GOTO 999 |
| 1297 |
END IF |
| 1298 |
|
| 1299 |
C CHECK FOR VALID CLRMOD. |
| 1300 |
IF(CLRMOD.NE.0.AND.CLRMOD.NE.1) THEN |
| 1301 |
CALL WPSTER(725,5) |
| 1302 |
GOTO 999 |
| 1303 |
END IF |
| 1304 |
|
| 1305 |
C CHECK FOR VALID INDEXES. |
| 1306 |
DO 100 I=1,NUM |
| 1307 |
INDEXN=INDEX(I) |
| 1308 |
IF(INDEXN.LT.0.OR.INDEXN.GT.255) THEN |
| 1309 |
CALL WPSTER(724,5) |
| 1310 |
GOTO 100 |
| 1311 |
END IF |
| 1312 |
C CHECK FOR VALID CLRARY. |
| 1313 |
CLRAR1=CLRARY(1,I) |
| 1314 |
CLRAR2=CLRARY(2,I) |
| 1315 |
CLRAR3=CLRARY(3,I) |
| 1316 |
IF(CLRMOD.EQ.0) THEN |
| 1317 |
IF(CLRAR1.LT.0..OR.CLRAR1.GT.1. |
| 1318 |
X .OR.CLRAR2.LT.0..OR.CLRAR2.GT.1. |
| 1319 |
X .OR.CLRAR3.LT.0..OR.CLRAR3.GT.1.) THEN |
| 1320 |
CALL WPSTER(727,5) |
| 1321 |
GOTO 100 |
| 1322 |
END IF |
| 1323 |
|
| 1324 |
C ONLY TWO INDEXES ARE SUPPORTED: |
| 1325 |
C 0 WHICH IS THE DEFAULT FOREGROUND COLOR AND MUST ALWAYS REMAIN |
| 1326 |
C BLACK (0.0, 0.0, 0.0) |
| 1327 |
C 7 WHICH IS THE DEFAULT BACKGROUND COLOR AND MUST ALWAYS REMAIN |
| 1328 |
C WHITE (1.0, 1.0, 1.0) |
| 1329 |
C THEREFORE, NO ACTION IS NECESSARY. |
| 1330 |
ELSE |
| 1331 |
IF(CLRAR1.LT.0..OR.CLRAR1.GT.360. |
| 1332 |
X .OR.CLRAR2.LT.0..OR.CLRAR2.GT.1. |
| 1333 |
X .OR.CLRAR3.LT.0..OR.CLRAR3.GT.1.) THEN |
| 1334 |
CALL WPSTER(727,5) |
| 1335 |
GOTO 100 |
| 1336 |
END IF |
| 1337 |
|
| 1338 |
C ONLY TWO INDEXES ARE SUPPORTED: |
| 1339 |
C 0 WHICH IS THE DEFAULT FOREGROUND COLOR AND MUST ALWAYS REMAIN |
| 1340 |
C BLACK (0.0, 0.0, 0.0) |
| 1341 |
C 7 WHICH IS THE DEFAULT BACKGROUND COLOR AND MUST ALWAYS REMAIN |
| 1342 |
C WHITE (1.0, 1.0, 1.0) |
| 1343 |
C THEREFORE, NO ACTION IS NECESSARY. |
| 1344 |
END IF |
| 1345 |
100 CONTINUE |
| 1346 |
|
| 1347 |
999 RETURN |
| 1348 |
END |
| 1349 |
SUBROUTINE WPSTFC(COLOR) |
| 1350 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1351 |
|
| 1352 |
C VDSTFC -Set Foreground Color. |
| 1353 |
|
| 1354 |
C R.W.Simons -05DEC80 |
| 1355 |
|
| 1356 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1357 |
C All Devices with a constant black foreground. (LXY, |
| 1358 |
C HC1) |
| 1359 |
|
| 1360 |
C ENTRY CONDITIONS -COLOR = integer color table index . Range 0-255. |
| 1361 |
C Default is device dependent, in range 0-7. |
| 1362 |
|
| 1363 |
C CALLS -VBERRH |
| 1364 |
|
| 1365 |
C EXIT CONDITIONS -VECTOR(1) = real updated foreground color (COLOR). |
| 1366 |
|
| 1367 |
C NARRATIVE -Set the foreground color index, i.e., the color |
| 1368 |
C table index used for drawing future primitives. |
| 1369 |
C Color is an integer from 0-255 which is used as an |
| 1370 |
C index into the color table (see VDSTCO). |
| 1371 |
C All devices must support at least a single device |
| 1372 |
C dependent value in the range 0-7. |
| 1373 |
C If an unsupported value is specified, set to |
| 1374 |
C default. |
| 1375 |
|
| 1376 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1377 |
|
| 1378 |
INTEGER COLOR |
| 1379 |
|
| 1380 |
REAL VECTOR(7) |
| 1381 |
COMMON /WPST03/ VECTOR |
| 1382 |
|
| 1383 |
C CHECK FOR VALID COLOR. |
| 1384 |
IF(COLOR.LT.0.OR.COLOR.GT.255) THEN |
| 1385 |
CALL WPSTER(724,5) |
| 1386 |
GOTO 999 |
| 1387 |
END IF |
| 1388 |
|
| 1389 |
C ONLY THE SINGLE FOREGROUND COLOR 0 (BLACK) IS SUPPORTED, |
| 1390 |
C SO NO ACTION IS NECESSARY. |
| 1391 |
|
| 1392 |
999 RETURN |
| 1393 |
END |
| 1394 |
SUBROUTINE WPSTIN(INTEN) |
| 1395 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1396 |
|
| 1397 |
C VDSTIN -Set Intensity. |
| 1398 |
|
| 1399 |
C R.W.Simons -05DEC80 |
| 1400 |
|
| 1401 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1402 |
C All Single Intensity Devices. (LXY, HC1) |
| 1403 |
|
| 1404 |
C ENTRY CONDITIONS -INTEN = real intensity of the image of an output |
| 1405 |
C primitive. Range 0.-1. Default: device dependent. |
| 1406 |
|
| 1407 |
C CALLS - |
| 1408 |
|
| 1409 |
C EXIT CONDITIONS -VECTOR(3) = real updated intensity (INTEN). |
| 1410 |
|
| 1411 |
C NARRATIVE -Set the intensity value indicated for future |
| 1412 |
C primitives. Intensity is a real value between 0 |
| 1413 |
C (not visible) and 1 (maximum). Intensities are |
| 1414 |
C monotonically increasing within this range. |
| 1415 |
C All devices must support at least a single value: |
| 1416 |
C 1.0. If an unsupported value is specified, set to |
| 1417 |
C the closest supported intensity. |
| 1418 |
|
| 1419 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1420 |
|
| 1421 |
REAL INTEN |
| 1422 |
|
| 1423 |
REAL VECTOR(7) |
| 1424 |
COMMON /WPST03/ VECTOR |
| 1425 |
|
| 1426 |
C CHECK FOR VALID INTEN. |
| 1427 |
IF(INTEN.LT.0.0.OR.INTEN.GT.1.0) THEN |
| 1428 |
CALL WPSTER(401,5) |
| 1429 |
GOTO 999 |
| 1430 |
END IF |
| 1431 |
|
| 1432 |
C ONLY THE SINGLE INTENSITY 1.0 (MAXIMUM) IS SUPPORTED, |
| 1433 |
C SO NO ACTION IS NECESSARY. |
| 1434 |
|
| 1435 |
999 RETURN |
| 1436 |
END |
| 1437 |
SUBROUTINE WPSTDC(INDEX,VALUE) |
| 1438 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1439 |
|
| 1440 |
C VDIQDC -Inquire Device Capabilities. |
| 1441 |
|
| 1442 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1443 |
|
| 1444 |
C ENTRY CONDITIONS -INDEX = integer capability number. Range 1-33. |
| 1445 |
|
| 1446 |
C CALLS - |
| 1447 |
|
| 1448 |
C EXIT CONDITIONS -VALUE = real value of the capability indicated by |
| 1449 |
C INDEX. |
| 1450 |
|
| 1451 |
C NARRATIVE -Return values of various device capabilities. INDEX |
| 1452 |
C is the integer capability number (as given below), |
| 1453 |
C and the real value is returned in VALUE. |
| 1454 |
C 1. Erasability |
| 1455 |
C 0. None (hard copy) |
| 1456 |
C 1. Screen (Tektronix 4010) |
| 1457 |
C 2. Point or Line SLOW (Plasma) |
| 1458 |
C 3. Point or Line MEDIUM (Refresh -Serially connected) |
| 1459 |
C 4. Point or Line FAST (Refresh -Direct connected) |
| 1460 |
C 5. (1) and some (3) (Tektronix 4014 with write-thru mode) |
| 1461 |
C 2. Scan Type |
| 1462 |
C 0. Vector |
| 1463 |
C 1. Raster |
| 1464 |
C 2. Matrix (Plasma) |
| 1465 |
C 3. Intensities (1-N) |
| 1466 |
C 4. Colors (1-N) This is the number of colors that can be |
| 1467 |
C displayed at one time and may be less than the |
| 1468 |
C total number of colors the device can produce. |
| 1469 |
C 5. Line Widths (1-N) |
| 1470 |
C 6. Line Styles (0-N) A bit pattern indicating which of the 5 |
| 1471 |
C non-solid line styles are supported in the |
| 1472 |
C device. Bits 4,3,2,1, and 0 correspond to line |
| 1473 |
C styles medium dash, long dash, short dash, dot |
| 1474 |
C dash, and dot. (0 - device has no hardware line |
| 1475 |
C styles - simulate.) |
| 1476 |
C 7. Character Sizes (0-N) (0 - device has no hardware - simulate) |
| 1477 |
C 8. Number of Locator Devices |
| 1478 |
C 9. Number of Valuator Devices |
| 1479 |
C 10. Number of Button Devices |
| 1480 |
C 11. Number of Keyboard Devices |
| 1481 |
C 12. Number of Stroke Devices |
| 1482 |
C 13. Input |
| 1483 |
C 0. none |
| 1484 |
C 1. synchronous only - program requests input, then the user |
| 1485 |
C supplies it. |
| 1486 |
C 2. synchronous and asynchronous - synchronous is the same |
| 1487 |
C as in (1) above. Asynchronous means the user can provide |
| 1488 |
C input at any time; this input; is then saved by the system |
| 1489 |
C in an event queue until the program calls for it. |
| 1490 |
C 14. Input Timing |
| 1491 |
C 0. no timeout supported |
| 1492 |
C 1. unreliable timing |
| 1493 |
C 2. timeout with reliable timing |
| 1494 |
C 15. X Dimension of View Surface in Device Coordinates |
| 1495 |
C 16. Y Dimension of View Surface in Device Coordinates |
| 1496 |
C 17. X Dimension of View Surface in Physical Units (mm) (0 if |
| 1497 |
C undefined). If this dimension is variable (as for drum |
| 1498 |
C plotters), it should be set equal to the Y dimension to |
| 1499 |
C guarantee a device aspect ratio of 1.0. |
| 1500 |
C 18. Y Dimension of View Surface in Physical Units (mm) (0 if |
| 1501 |
C undefined). |
| 1502 |
C 19. Smallest Line Width (DC) at default intensity |
| 1503 |
C 20. Smallest Point (DC) at default intensity |
| 1504 |
C 21. Smallest Character Size (DC) |
| 1505 |
C 22. Header and Trailer Frames Required (0=no,1=yes) |
| 1506 |
C 23. Device Identifier |
| 1507 |
C 1. TK4 - Tektronix 4014 |
| 1508 |
C 1.1 TK6 - Tektronix 4016 |
| 1509 |
C 1.2 TEK - Tektronix 4010, 4012 |
| 1510 |
C 1.3 TP2 - Tektronix 4662 |
| 1511 |
C 1.4 TP8 - Tektronix 4662 with 8 pen option |
| 1512 |
C 1.5 T14 - Tektronix 4114 |
| 1513 |
C 1.6 T13 - Tektronix 4113 |
| 1514 |
C 1.7 T05 - TEKTRONIX 4105 |
| 1515 |
C 1.8 T07 - TEKTRONIX 4107 |
| 1516 |
C 1.9 T15 - TEKTRONIX 4115 |
| 1517 |
C 2.1 16C - Dicomed 16mm color Movies |
| 1518 |
C 2.2 16B - Dicomed 16mm black and white movies |
| 1519 |
C 2.3 35C - Dicomed 35mm color slides |
| 1520 |
C 2.31 3MC - Dicomed 35mm movie color |
| 1521 |
C 2.4 35B - Dicomed 35mm black and white slides |
| 1522 |
C 2.41 3MB - Dicomed 35mm movie black and white |
| 1523 |
C 2.5 35A - Dicomed 35mm Aperture Card |
| 1524 |
C 2.6 24L - Dicomed 24X Fiche |
| 1525 |
C 2.7 48L - Dicomed 48X Fiche |
| 1526 |
C 2.8 CSQ - Dicomed Color Full Frame(square aspect ratio) |
| 1527 |
C 2.9 BSQ - Dicomed Black and White Full Frame(square aspect) |
| 1528 |
C 3 R94 - Ramtek 9400 |
| 1529 |
C 4. T27 - Tektronix 4027 |
| 1530 |
C 4.1 T25 - Tektronix 4025 |
| 1531 |
C 5. ALP - Alphanumeric Terminal |
| 1532 |
C 6. HC1 - Remote Hard Copy |
| 1533 |
C 7. LXY - Printronix |
| 1534 |
C 8. TST - Test Driver, Print VDI calls made. |
| 1535 |
C 9. V25 - Digital VT125 |
| 1536 |
C 10. AED - AED 512 |
| 1537 |
C 10.1 AE7 - AED 767 |
| 1538 |
C 10.2 AE1 - AED 1024 |
| 1539 |
C 11. MET - SVDI Metafile |
| 1540 |
c 12. HPP - Hewlett Packard Printer/Plotter 2671G |
| 1541 |
C 12.1 H75 - HP 7580 |
| 1542 |
C 12.2 H72 - HP 7221C OR T |
| 1543 |
C 12.3 H74 - HP 7475A |
| 1544 |
C 14. RET - Retrographics |
| 1545 |
C 15. AP5 - Aps 5 Phototypesetter |
| 1546 |
c 16. JP7 - JUPITER 7 |
| 1547 |
C 16.1 JP1 - Jupiter 1024 |
| 1548 |
C 17. GER - Gerber 4400 Photoplotter |
| 1549 |
C 18. XYN - XYNETICS |
| 1550 |
C 20. PS3 - E & S Picture System 300 |
| 1551 |
C 21. QMS - QMS LASER PRINTER |
| 1552 |
C 22. C51 - CALCOMP 1051 DRUM PLOTTER |
| 1553 |
C 23. R25 - RASTER TECHNOLOGIES MODEL ONE/25 |
| 1554 |
C 24. QLF - QCR large format (8 x 10) |
| 1555 |
C 24.1 Q35 - QCR 35mm format |
| 1556 |
C 25. T45 - Tektronix 4510 Rasterizer |
| 1557 |
C 24. Polygon support level |
| 1558 |
C 0. no support |
| 1559 |
C 1. fills convex polygons |
| 1560 |
C 2. fills simple polygons (may be concave but not |
| 1561 |
C self-crossing) |
| 1562 |
C 3. full complex polygon fill support |
| 1563 |
C 25. Maximum number of points in a polygon (99999. if infinite) |
| 1564 |
C 26. Setable color table |
| 1565 |
C 0. no |
| 1566 |
C 1. yes |
| 1567 |
C 27. Device color palette size (1-N) - the number of different |
| 1568 |
C colors a device can produce (may be more than the device |
| 1569 |
C can display simultaneously) |
| 1570 |
C 28. Direct color space size (0-N) - the number of colors |
| 1571 |
C available via direct RGB color specification |
| 1572 |
C (displayable simultaneously) |
| 1573 |
C 29. Vector verses Raster VDI |
| 1574 |
C 0. SVDI |
| 1575 |
C 1. SVDI+Raster |
| 1576 |
C 30. Maximum character height (DC) |
| 1577 |
C 31. Maximum line width (DC) |
| 1578 |
C 32. Color verses monochrome (greyscale) device |
| 1579 |
C 0. monochrome |
| 1580 |
C 1. color |
| 1581 |
C 33. Device pixel aspect - the ratio of the spacing of device |
| 1582 |
C pixels in x divided by the spacing in y (1 for square |
| 1583 |
C pixels) |
| 1584 |
|
| 1585 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1586 |
|
| 1587 |
INTEGER INDEX |
| 1588 |
REAL VALUE |
| 1589 |
C ESCAPE FLAGS |
| 1590 |
C PATNO AND BORDER USED BY VIPOLY FOR FILL PATTERN AND BORDER ON/OFF; |
| 1591 |
C DEFAULT; COMPLETE FILL WITH BORDER. PLC. |
| 1592 |
COMMON /WPST06/ PGFORM,PATNO,BORDER |
| 1593 |
INTEGER PGFORM,PATNO,BORDER |
| 1594 |
|
| 1595 |
C INITIALIZE THE DEVICE CAPABILITIES VECTOR. |
| 1596 |
COMMON /WPST07/DEV |
| 1597 |
REAL DEV(33) |
| 1598 |
DEV(1) = 0. |
| 1599 |
DEV(2) = 1. |
| 1600 |
DEV(3) = 1. |
| 1601 |
DEV(4) = 1. |
| 1602 |
DEV(5) = 15. |
| 1603 |
DEV(6) = 2. |
| 1604 |
DEV(7) = 0. |
| 1605 |
DEV(8) = 0. |
| 1606 |
DEV(9) = 0. |
| 1607 |
DEV(10) = 0. |
| 1608 |
DEV(11) = 0. |
| 1609 |
DEV(12) = 0. |
| 1610 |
DEV(13) = 0. |
| 1611 |
DEV(14) = 0. |
| 1612 |
DEV(15) = 7230. |
| 1613 |
DEV(16) = 5040. |
| 1614 |
DEV(17) = 254. |
| 1615 |
DEV(18) = 178. |
| 1616 |
DEV(19) = 4. |
| 1617 |
DEV(20) = 10. |
| 1618 |
DEV(21) = 84. |
| 1619 |
DEV(22) = 0. |
| 1620 |
DEV(23) = 99. |
| 1621 |
DEV(24) = 3. |
| 1622 |
DEV(25) = 99999. |
| 1623 |
DEV(26) = 0. |
| 1624 |
DEV(27) = 1. |
| 1625 |
DEV(28) = 0. |
| 1626 |
DEV(29) = 0. |
| 1627 |
DEV(30) = 5000. |
| 1628 |
DEV(31) = 750. |
| 1629 |
DEV(32) = 0. |
| 1630 |
DEV(33) = 1. |
| 1631 |
|
| 1632 |
C CHECK FOR VALID INDEX. |
| 1633 |
IF(INDEX.LT.1.OR.INDEX.GT.33) THEN |
| 1634 |
CALL WPSTER(726,5) |
| 1635 |
GOTO 999 |
| 1636 |
END IF |
| 1637 |
|
| 1638 |
C RETURN INDEXED VALUE. |
| 1639 |
VALUE=DEV(INDEX) |
| 1640 |
|
| 1641 |
999 RETURN |
| 1642 |
END |
| 1643 |
SUBROUTINE WPSTII(ASPECT,JUSTIF) |
| 1644 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1645 |
|
| 1646 |
C VIINIT -Initialize SVDI. postscript device |
| 1647 |
|
| 1648 |
C D.L. CAMPBELL -1-DEC-1986 |
| 1649 |
C J.P. LONG -9-NOV-1987 |
| 1650 |
|
| 1651 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1652 |
C (postscript) |
| 1653 |
|
| 1654 |
C ENTRY CONDITIONS -ASPECT = real ratio of X dimension to Y dimension. |
| 1655 |
C Range >0.0. Default: 0. (device dependent). |
| 1656 |
C JUSTIF = integer justification of NDC space on the |
| 1657 |
C device. Range 0-9. Default: 0 (device dependent.) |
| 1658 |
|
| 1659 |
C CALLS -VBERRH,VDSTCS,VDSTLW,VIMOVA |
| 1660 |
|
| 1661 |
C EXIT CONDITIONS -XNDCMX,YNDCMX = real NDC maximum valid values(as |
| 1662 |
C constrained by ASPECT). |
| 1663 |
C VECTOR = real array of attribute values(all device |
| 1664 |
C dependent except VECTOR(4)=0.0). |
| 1665 |
|
| 1666 |
C NARRATIVE -This must be the first SVDI call made. All |
| 1667 |
C attribute values, the color table, and current |
| 1668 |
C position are set to appropriate defaults for the |
| 1669 |
C device. All necessary input device initialization |
| 1670 |
C is done. The screen is cleared or paper advanced |
| 1671 |
C if necessary to guarantee a blank view surface for |
| 1672 |
C drawing on. |
| 1673 |
|
| 1674 |
C ASPECT specifies the ratio of the X dimension to the |
| 1675 |
C Y dimension . Maximum NDC values (at least one of |
| 1676 |
C which will be 1.0) are computed to give the ASPECT |
| 1677 |
C specified. The default ASPECT (0.0) is device |
| 1678 |
C dependent and equals the aspect ratio of the |
| 1679 |
C physical device, except for variable aspect devices |
| 1680 |
C (such as drum plotters) which are assigned a default |
| 1681 |
C aspect of 1.0. The NDC rectangle is scaled until |
| 1682 |
C one dimension fills the corresponding dimension of |
| 1683 |
C the device. |
| 1684 |
|
| 1685 |
C JUSTIF determines where the rectangle is located on |
| 1686 |
C the device as diagrammed below: |
| 1687 |
C --------- |
| 1688 |
C | 7 8 9 | |
| 1689 |
C | 4 5 6 | |
| 1690 |
C | 1 2 3 | |
| 1691 |
C --------- |
| 1692 |
C For example, JUSTIF = 7 indicates NDC space will be |
| 1693 |
C upper left justified on the device. |
| 1694 |
|
| 1695 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1696 |
|
| 1697 |
REAL ASPECT |
| 1698 |
INTEGER JUSTIF |
| 1699 |
|
| 1700 |
REAL XNDCMX,YNDCMX |
| 1701 |
COMMON /WPST02/ XNDCMX,YNDCMX |
| 1702 |
REAL VECTOR(7) |
| 1703 |
COMMON /WPST03/ VECTOR |
| 1704 |
REAL XCP,YCP |
| 1705 |
COMMON /WPST05/ XCP,YCP |
| 1706 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 1707 |
1KCOMTP |
| 1708 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 1709 |
1 KBAUD,KCOMTP |
| 1710 |
REAL XSCALE,YSCALE |
| 1711 |
COMMON /WPST08/ XSCALE,YSCALE |
| 1712 |
INTEGER XPAD,YPAD,XDEVIC,YDEVIC |
| 1713 |
COMMON /WPST09/ XPAD,YPAD,XDEVIC,YDEVIC |
| 1714 |
COMMON /WPST11/ IVECT,COORD |
| 1715 |
CHARACTER COORD*20 |
| 1716 |
INTEGER IVECT |
| 1717 |
INTEGER*4 MACHIN(3),MACLEN |
| 1718 |
INTEGER*4 KIDSIZ,KJOBID(4),KUSRSZ,KUSRID(4),KSZROU |
| 1719 |
INTEGER*4 KJROUT(4),KSECUR,KJTIME(4),KJDATE(4) |
| 1720 |
COMMON / VCJOB/ KIDSIZ,KJOBID,KUSRSZ,KUSRID,KSZROU, |
| 1721 |
1 KJROUT,KSECUR,KJTIME,KJDATE,MACHIN,MACLEN |
| 1722 |
|
| 1723 |
COMMON /WPST07/ DEV |
| 1724 |
REAL DEV(33) |
| 1725 |
C ESCAPE FLAGS |
| 1726 |
C PATNO AND BORDER USED BY VIPOLY FOR FILL PATTERN AND BORDER ON/OFF; |
| 1727 |
C DEFAULT; COMPLETE FILL WITH BORDER. PLC. |
| 1728 |
COMMON /WPST06/ PGFORM,PATNO,BORDER |
| 1729 |
INTEGER PGFORM,PATNO,BORDER |
| 1730 |
CHARACTER XCOORD*5,YCOORD*5 |
| 1731 |
|
| 1732 |
C SET DEFAULT ATTRIBUTE VALUES. ALL ARE DEVICE DEPENDENT EXCEPT |
| 1733 |
C VECTOR(4)=0.0. |
| 1734 |
C VECTOR(1)=FOREGROUND COLOR - BLACK |
| 1735 |
C (2)=BACKGROUND COLOR - WHITE |
| 1736 |
C (3)=INTENSITY - MAXIMUM |
| 1737 |
C (4)=LINE STYLE - SOLID |
| 1738 |
C (5)=LINE WIDTH - ABOUT 1/72 INCHES |
| 1739 |
C (6)=CHARACTER BOX Y - ABOUT 1/10 INCHES |
| 1740 |
C (7)=CHARACTER BOX X - 5/7 OF BOX-Y |
| 1741 |
|
| 1742 |
IVECT=0 |
| 1743 |
VECTOR(1) = 0. |
| 1744 |
VECTOR(2) = 7. |
| 1745 |
VECTOR(3) = 1. |
| 1746 |
VECTOR(4) = 0. |
| 1747 |
VECTOR(5) = 0.06255 |
| 1748 |
VECTOR(6) = 0.01 |
| 1749 |
VECTOR(7) = 0. |
| 1750 |
PATNO = 20 |
| 1751 |
BORDER = 1 |
| 1752 |
PGFORM = 0 |
| 1753 |
XCP = 0. |
| 1754 |
YCP = 0. |
| 1755 |
C PROTECT INPUT PARAMETERS FROM BEING CHANGED. |
| 1756 |
ASPEC1=ASPECT |
| 1757 |
JUSTI1=JUSTIF |
| 1758 |
|
| 1759 |
C CHECK FOR VALID ASPECT. IF(ASPECT.LT.0.0) THEN CALL VBERRH(721,5), |
| 1760 |
C AND USE DEFAULT ASPECT. |
| 1761 |
IF(ASPECT.LT.0.0) THEN |
| 1762 |
CALL WPSTER(721,5) |
| 1763 |
ASPEC1=0.0 |
| 1764 |
END IF |
| 1765 |
|
| 1766 |
C CHECK FOR VALID JUSTIF. IF(JUSTIF.LT.0 .OR. JUSTIF.GT.9) THEN |
| 1767 |
C CALL VBERRH(720,5), AND USE DEFAULT JUSTIF. |
| 1768 |
IF(JUSTIF.LT.0.OR.JUSTIF.GT.9) THEN |
| 1769 |
CALL WPSTER(720,5) |
| 1770 |
JUSTI1=0 |
| 1771 |
END IF |
| 1772 |
|
| 1773 |
C SCALE NDC UNITS TO DEVICE UNITS. |
| 1774 |
C FOR QMS, THE PHYSICAL PLOT SURFACE IS XINCH X YINCH (10.x7.5). |
| 1775 |
C DEVICE COORDINATES ARE KEPT IN 1/723 INCH TO GAIN SIMPLICITY |
| 1776 |
C IN ASSEMBLING CHARACTER STRINGS WITH FLOATING NUMBERS |
| 1777 |
C ACCURATE TO TENTHS OF DEVICE UNITS |
| 1778 |
C THE DEVICE ASPECT IS XINCH/YINCH |
| 1779 |
C BUT WE MUST MAP THE ASPECT SPECIFIED IN DC INTO THIS |
| 1780 |
C ADDRESSABILITY,USING AS MUCH OF THE SPACE AS POSSIBLE. |
| 1781 |
XINCH=10.0 |
| 1782 |
YINCH=7.5 |
| 1783 |
C CHECK PAGE FORMAT - IF PORTRAIT, |
| 1784 |
C THEN SWITCH THINGS AROUND |
| 1785 |
IF (PGFORM.EQ.1) THEN |
| 1786 |
TEMP=XINCH |
| 1787 |
XINCH=YINCH |
| 1788 |
YINCH=TEMP |
| 1789 |
TEMP=DEV(15) |
| 1790 |
DEV(15)=DEV(16) |
| 1791 |
DEV(16)=TEMP |
| 1792 |
TEMP=DEV(17) |
| 1793 |
DEV(17)=DEV(18) |
| 1794 |
DEV(18)=TEMP |
| 1795 |
ENDIF |
| 1796 |
XUNITS=XINCH*723. |
| 1797 |
YUNITS=YINCH*723. |
| 1798 |
DASPEC=XUNITS/YUNITS |
| 1799 |
|
| 1800 |
C DEFAULT ASPECT = 1., DEFAULT JUSTIF = 1. |
| 1801 |
IF(ASPEC1.EQ.0.) ASPEC1=DASPEC |
| 1802 |
IF(JUSTI1.EQ.0) JUSTI1=1 |
| 1803 |
|
| 1804 |
IF(ASPEC1.GE.DASPEC) THEN |
| 1805 |
|
| 1806 |
C THEN X DIMENSION IS FILLED. |
| 1807 |
XDEVIC=XUNITS |
| 1808 |
YDEVIC=XUNITS/ASPEC1 |
| 1809 |
XPAD=0 |
| 1810 |
C FIGURE HOW MUCH Y PADDING IS NEEDED. |
| 1811 |
IF(JUSTI1.LE.3) THEN |
| 1812 |
YPAD=0 |
| 1813 |
ELSE IF(JUSTI1.LE.6) THEN |
| 1814 |
YPAD=(YUNITS-YDEVIC)/2 |
| 1815 |
ELSE |
| 1816 |
YPAD=YUNITS-YDEVIC |
| 1817 |
END IF |
| 1818 |
ELSE |
| 1819 |
|
| 1820 |
C ELSE Y DIMENSION IS FILLED. |
| 1821 |
XDEVIC=YUNITS*ASPEC1 |
| 1822 |
YDEVIC=YUNITS |
| 1823 |
YPAD=0 |
| 1824 |
C FIGURE HOW MUCH X PADDING IS NEEDED. |
| 1825 |
IF(JUSTI1.EQ.3.OR.JUSTI1.EQ.6.OR.JUSTI1.EQ.9) THEN |
| 1826 |
XPAD=XUNITS-XDEVIC |
| 1827 |
ELSE IF(JUSTI1.EQ.2.OR.JUSTI1.EQ.5.OR.JUSTI1.EQ.8) THEN |
| 1828 |
XPAD=(XUNITS-XDEVIC)/2 |
| 1829 |
ELSE |
| 1830 |
XPAD=0 |
| 1831 |
END IF |
| 1832 |
END IF |
| 1833 |
|
| 1834 |
C FIGURE MAXIMUM NDC VALUES XNDCMX AND YNDCMX. |
| 1835 |
IF(ASPEC1.GE.DASPEC) THEN |
| 1836 |
XNDCMX=AMIN1(1.,ASPEC1) |
| 1837 |
YNDCMX=XNDCMX/ASPEC1 |
| 1838 |
ELSE |
| 1839 |
XNDCMX=ASPEC1 |
| 1840 |
YNDCMX=1. |
| 1841 |
END IF |
| 1842 |
|
| 1843 |
C SET SCALE FACTORS FOR NDC-TO-DEVICE MAPPING. |
| 1844 |
XSCALE=DBLE(XDEVIC)/XNDCMX |
| 1845 |
YSCALE=DBLE(YDEVIC)/YNDCMX |
| 1846 |
IF (PGFORM .GT. 0) THEN |
| 1847 |
YPAD = YPAD+280. |
| 1848 |
XPAD = XPAD+360. |
| 1849 |
ELSE |
| 1850 |
XPAD = XPAD+280. |
| 1851 |
YPAD = YPAD-180. |
| 1852 |
ENDIF |
| 1853 |
|
| 1854 |
C SET UP MONITORING INFORMATION |
| 1855 |
CALL WPSTDV('C PST ') |
| 1856 |
CALL WPSTMO(0) |
| 1857 |
|
| 1858 |
C OPEN OUTPUT FILE |
| 1859 |
CALL WPSTOF(KOUTFL) |
| 1860 |
|
| 1861 |
C INITIALIZE THE QMS PS JET |
| 1862 |
CALL WPST15(2,'%!') |
| 1863 |
CALL WPST15(1,CHAR(13)) |
| 1864 |
CALL WPST15(1,CHAR(10)) |
| 1865 |
CALL WPST15(27,'/y {/Courier findfont} def ') |
| 1866 |
CALL WPST15(27,'/x {scalefont setfont} def ') |
| 1867 |
CALL WPST15(45,'initgraphics /m {moveto} def /l {lineto} def ') |
| 1868 |
CALL WPST15 |
| 1869 |
* (50,'/c {closepath} def /v {save} def /r {restore} def ') |
| 1870 |
CALL WPST15 |
| 1871 |
* (54,'/f {eofill} def /s {stroke} def /w {setlinewidth} def ') |
| 1872 |
CALL WPST15(31,'/h {setdash} def /t {show} def ') |
| 1873 |
CALL WPST15(33,'/d {gsave} def /u {grestore} def ') |
| 1874 |
CALL WPST15(14,'1 setlinejoin ') |
| 1875 |
C SET PAGE FORMAT (LANDSCAPE/PORTRAIT) |
| 1876 |
IF (PGFORM.EQ.0) THEN |
| 1877 |
CALL WPST15(4,'/o {') |
| 1878 |
CALL WPST15(10,'90 rotate ') |
| 1879 |
CALL CDRI2C(0,4,XCOORD) |
| 1880 |
CALL CDRI2C(INT(YDEVIC+YDEVIC*3./32.),4,YCOORD) |
| 1881 |
COORD = ' '//XCOORD(1:3)//'.'//XCOORD(4:4)//' -'// |
| 1882 |
1 YCOORD(1:3)//'.'//YCOORD(4:4) |
| 1883 |
CALL WPST15( 13,COORD) |
| 1884 |
CALL WPST15(11,' translate ') |
| 1885 |
CALL WPST15(6,'} def ') |
| 1886 |
YPAD = -YPAD |
| 1887 |
ELSE |
| 1888 |
CALL WPST15(17,'/o {newpath} def ') |
| 1889 |
ENDIF |
| 1890 |
c define the postscript current position |
| 1891 |
CALL WPST15(35,'/p {showpage} def 1 setlinecap v o ') |
| 1892 |
CALL WPST13(0,XCP,YCP) |
| 1893 |
|
| 1894 |
C INIT LINE WIDTH,CHARACTER SIZE |
| 1895 |
CALL WPSTLW(VECTOR(5)) |
| 1896 |
CALL WPSTCS(VECTOR(6)) |
| 1897 |
RETURN |
| 1898 |
END |
| 1899 |
SUBROUTINE WPSTIT |
| 1900 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1901 |
|
| 1902 |
C VITERM -TERMINATE. |
| 1903 |
|
| 1904 |
C D.L. CAMPBELL -1-DEC-1986 |
| 1905 |
C J.P. LONG -9-NOV-1987 |
| 1906 |
|
| 1907 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1908 |
|
| 1909 |
C ENTRY CONDITIONS - |
| 1910 |
|
| 1911 |
C CALLS - |
| 1912 |
|
| 1913 |
C EXIT CONDITIONS - |
| 1914 |
|
| 1915 |
C NARRATIVE -Terminate graphics device. Close output file. |
| 1916 |
|
| 1917 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1918 |
|
| 1919 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 1920 |
1KCOMTP |
| 1921 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 1922 |
1 KBAUD,KCOMTP |
| 1923 |
|
| 1924 |
c put out the last page and restore postscript environment so |
| 1925 |
c nothing is left on the stack |
| 1926 |
CALL WPSTIG |
| 1927 |
CALL WPST15(2,'r ') |
| 1928 |
C FLUSH BUFFER |
| 1929 |
CALL WPST15(0,' ') |
| 1930 |
C CLOSE OUTPUT FILE |
| 1931 |
CALL WPSTCF(KOUTFL,1) |
| 1932 |
CALL WPSTMO(2) |
| 1933 |
|
| 1934 |
RETURN |
| 1935 |
END |
| 1936 |
SUBROUTINE WPSTIM(X,Y) |
| 1937 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1938 |
|
| 1939 |
C VIMOVA -Move Absolute. |
| 1940 |
|
| 1941 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1942 |
|
| 1943 |
C ENTRY CONDITIONS -X,Y = real NDC position. |
| 1944 |
|
| 1945 |
C CALLS - |
| 1946 |
|
| 1947 |
C EXIT CONDITIONS -XCP,YCP = real updated current position. (X,Y) |
| 1948 |
|
| 1949 |
C NARRATIVE -Set current position to absolute NDC position X,Y. |
| 1950 |
|
| 1951 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1952 |
|
| 1953 |
REAL X,Y |
| 1954 |
|
| 1955 |
C move |
| 1956 |
CALL WPST13(0,X,Y) |
| 1957 |
|
| 1958 |
RETURN |
| 1959 |
END |
| 1960 |
SUBROUTINE WPSTIP(X,Y) |
| 1961 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1962 |
|
| 1963 |
C VIPNTA -Point Absolute. |
| 1964 |
|
| 1965 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 1966 |
|
| 1967 |
C ENTRY CONDITIONS -X,Y = real NDC position. |
| 1968 |
|
| 1969 |
C CALLS -VIMOVA,VILINA |
| 1970 |
|
| 1971 |
C EXIT CONDITIONS - |
| 1972 |
|
| 1973 |
C NARRATIVE -Set current position to absolute NDC position X,Y |
| 1974 |
C and put a visible point there. Attributes |
| 1975 |
C foreground color and intensity apply. |
| 1976 |
|
| 1977 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1978 |
|
| 1979 |
REAL X,Y |
| 1980 |
|
| 1981 |
CALL WPSTIM(X,Y) |
| 1982 |
CALL WPSTIL(X,Y) |
| 1983 |
|
| 1984 |
RETURN |
| 1985 |
END |
| 1986 |
SUBROUTINE WPST10(XARRAY,YARRAY,NPTS) |
| 1987 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 1988 |
|
| 1989 |
C VIPOLY -POLYGON FILL ROUTINE |
| 1990 |
|
| 1991 |
C D.L. CAMPBELL -1-DEC-1986 |
| 1992 |
C J.P. LONG -9-NOV-1987 |
| 1993 |
|
| 1994 |
C ENVIRONMENT -Fortran77, QMS |
| 1995 |
|
| 1996 |
C ENTRY CONDITIONS -XARRAY-ARRAY OF X VALUES OF THE POLYGON |
| 1997 |
C YARRAY-CORRESPONDING ARRAY OF Y VALUES |
| 1998 |
C NPTS- NUMBER OF POINTS IN (XARRAY,YARRAY) |
| 1999 |
|
| 2000 |
C CALLS - |
| 2001 |
|
| 2002 |
C EXIT CONDITIONS - |
| 2003 |
|
| 2004 |
C NARRATIVE -The polygon defined by XARRAY,YARRAY will be drawn |
| 2005 |
C and filled (constrained by any limitations of the |
| 2006 |
C physical device -- see below). No checking will be |
| 2007 |
C done -- all points will be passed to the device. |
| 2008 |
C Current foreground color is used and the polygon |
| 2009 |
C boundary is drawn using the solid line style. |
| 2010 |
C VDI will close the polygon (i.e. the last point |
| 2011 |
C will be connected to the first). |
| 2012 |
|
| 2013 |
C The level of support for this primitive is device- |
| 2014 |
C dependent. The level of support is categorized |
| 2015 |
C as follows: |
| 2016 |
|
| 2017 |
C Level 0 -- no polygon fill. Only the polygon |
| 2018 |
C boundary is drawn. |
| 2019 |
C Level 1 -- the device fills convex polygons. |
| 2020 |
C Level 2 -- the device fills simple polygons (may |
| 2021 |
C be concave but not self-crossing) |
| 2022 |
C Level 3 -- full support for complex polygons (may |
| 2023 |
C be self-crossing). In general, the interior of |
| 2024 |
C a complex polygon is defined by the set of points |
| 2025 |
C such that, for each point, when an imaginary line |
| 2026 |
C is drawn to that point from a point far outside |
| 2027 |
C the polygon, that line intersects the polygon |
| 2028 |
C boundary an odd number of times. |
| 2029 |
|
| 2030 |
C Note that the level of support for a particular device |
| 2031 |
C can be inquired using the function VDIQDC. |
| 2032 |
|
| 2033 |
******************************************************************************** |
| 2034 |
|
| 2035 |
C The level for this device is level 2. |
| 2036 |
|
| 2037 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2038 |
|
| 2039 |
REAL XARRAY(NPTS),YARRAY(NPTS) |
| 2040 |
|
| 2041 |
c ESCAPE FLAGS |
| 2042 |
C PATNO AND BORDER USED BY VIPOLY FOR PATTERN FILL AND BORDER ON/OFF. DEFAULT |
| 2043 |
C COMPLETE FILL AND BORDER ON |
| 2044 |
REAL VECTOR(7) |
| 2045 |
COMMON /WPST03/ VECTOR |
| 2046 |
COMMON /WPST06/ PGFORM,PATNO,BORDER |
| 2047 |
INTEGER PGFORM,PATNO,BORDER |
| 2048 |
COMMON /WPST11/ IVECT,COORD |
| 2049 |
CHARACTER COORD*20 |
| 2050 |
INTEGER IVECT |
| 2051 |
|
| 2052 |
C CHECK FOR VALID N |
| 2053 |
IF (NPTS.LT.1 .OR. NPTS.GT.1490) THEN |
| 2054 |
CALL WPSTER(802,5) |
| 2055 |
GO TO 999 |
| 2056 |
END IF |
| 2057 |
|
| 2058 |
C IF A SET OF VECTORS WAS IN PROCESS, ISSUE STROKE COMMAND TO DRAW THEM |
| 2059 |
C Start a new path. |
| 2060 |
|
| 2061 |
CALL WPST15(2,'s ') |
| 2062 |
IVECT=0 |
| 2063 |
|
| 2064 |
CALL WPST15(2,'r ') |
| 2065 |
CALL WPST15(0,' ') |
| 2066 |
CALL WPST15(4,'v o ') |
| 2067 |
CALL WPSTLW(VECTOR(5)) |
| 2068 |
CALL WPSTCS(VECTOR(6)) |
| 2069 |
|
| 2070 |
C DRAW POLYGON VECTORS |
| 2071 |
|
| 2072 |
C MOVE TO FIRST POINT |
| 2073 |
CALL WPSTMV(XARRAY(1),YARRAY(1)) |
| 2074 |
|
| 2075 |
C CALL VDLINA TO DRAW POINTS FROM 1ST POINT TO NTH POINT |
| 2076 |
DO 100 I=2,NPTS |
| 2077 |
CALL WPSTLN(XARRAY(I),YARRAY(I)) |
| 2078 |
100 CONTINUE |
| 2079 |
|
| 2080 |
C THEN DRAW A LINE TO THE FIRST POINT TO CLOSE THE POLYGON |
| 2081 |
CALL WPSTLN(XARRAY(1),YARRAY(1)) |
| 2082 |
|
| 2083 |
C CLOSE THE POLYGON, GRAPHICS SAVE, FILL IT, GRAPHICS RESTORE, STROKE |
| 2084 |
C TO PROVIDE THE SAME FILLED AREA AS IF IT WERE FILLED WITH VECTORS |
| 2085 |
C THEN RESTORE AND SAVE POSTSCRIPT ENVIRONMENT TO AVOID INPUT BUFFER OVERFLOW |
| 2086 |
CALL WPST15(13,' c d f u s r ') |
| 2087 |
CALL WPST15(0,' ') |
| 2088 |
CALL WPST15(4,'v o ') |
| 2089 |
CALL WPSTLW(VECTOR(5)) |
| 2090 |
CALL WPSTCS(VECTOR(6)) |
| 2091 |
|
| 2092 |
C INIT THE CURRENT POSITION WITHIN POSTSCRIPT |
| 2093 |
CALL WPSTMV(XARRAY(NPTS),YARRAY(NPTS)) |
| 2094 |
IVECT=0 |
| 2095 |
|
| 2096 |
999 RETURN |
| 2097 |
END |
| 2098 |
SUBROUTINE WPSTIG |
| 2099 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2100 |
|
| 2101 |
C VINWPG -New Page. |
| 2102 |
|
| 2103 |
C D.L. CAMPBELL -1-DEC-1986 |
| 2104 |
C J.P. LONG -9-NOV-1987 |
| 2105 |
|
| 2106 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2107 |
|
| 2108 |
C ENTRY CONDITIONS - |
| 2109 |
|
| 2110 |
C CALLS - |
| 2111 |
|
| 2112 |
C EXIT CONDITIONS - |
| 2113 |
|
| 2114 |
C NARRATIVE -Physically advance the medium or clear the screen, |
| 2115 |
C whichever is appropriate. Also flood the screen |
| 2116 |
C with the background color on devices that support |
| 2117 |
C this. The current position is not changed. |
| 2118 |
|
| 2119 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2120 |
|
| 2121 |
COMMON /WPST11/ IVECT,COORD |
| 2122 |
CHARACTER COORD*20 |
| 2123 |
INTEGER IVECT |
| 2124 |
REAL VECTOR(7) |
| 2125 |
COMMON /WPST03/ VECTOR |
| 2126 |
|
| 2127 |
c stroke the path in case there are any vector and show text |
| 2128 |
CALL WPST15(2,'s ') |
| 2129 |
IVECT=0 |
| 2130 |
|
| 2131 |
c showpage and restore postscript environment to avoid buffer overflow |
| 2132 |
c flush buffer because save and restore won't work back-to-back |
| 2133 |
|
| 2134 |
CALL WPST15(4,'p r ') |
| 2135 |
CALL WPST15(0,' ') |
| 2136 |
CALL WPST15(4,'v o ') |
| 2137 |
CALL WPSTLW(VECTOR(5)) |
| 2138 |
CALL WPSTCS(VECTOR(6)) |
| 2139 |
CALL WPSTMO(1) |
| 2140 |
|
| 2141 |
RETURN |
| 2142 |
END |
| 2143 |
SUBROUTINE WPSTES(ESCPCD,N,ARGS) |
| 2144 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2145 |
|
| 2146 |
C VDESCP -Escape Code Routine. |
| 2147 |
|
| 2148 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2149 |
|
| 2150 |
C ENTRY CONDITIONS -ESCPCD = integer escape function code. |
| 2151 |
C N = integer number of arguments in ARG. RANGE >=0. |
| 2152 |
C ARGS = real array of arguments for the escape |
| 2153 |
C function specified. |
| 2154 |
|
| 2155 |
C CALLS - |
| 2156 |
|
| 2157 |
C EXIT CONDITIONS - |
| 2158 |
|
| 2159 |
C NARRATIVE -Invoke the nonstandard, device-dependent function |
| 2160 |
C ESCPCD. N is the number of arguments used by this |
| 2161 |
C function and ARGS is a real array containing those |
| 2162 |
C arguments. Unsupported values of ESCPCD are |
| 2163 |
C ignored, not causing an error. |
| 2164 |
|
| 2165 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2166 |
|
| 2167 |
INTEGER ESCPCD,N |
| 2168 |
REAL ARGS(*) |
| 2169 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 2170 |
1KCOMTP |
| 2171 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 2172 |
1 KBAUD,KCOMTP |
| 2173 |
REAL XSCALE,YSCALE |
| 2174 |
COMMON /WPST08/ XSCALE,YSCALE |
| 2175 |
INTEGER XPAD,YPAD,XDEVIC,YDEVIC |
| 2176 |
COMMON /WPST09/ XPAD,YPAD,XDEVIC,YDEVIC |
| 2177 |
|
| 2178 |
C USED BY VIPOLY FOR PATTERN FILL AND BORDER ON/OFF. DEFAULT COMPLETE FILL |
| 2179 |
C AND BORDER ON. PLC. |
| 2180 |
COMMON/WPST06/PGFORM,PATNO,BORDER |
| 2181 |
INTEGER PGFORM,PATNO,BORDER |
| 2182 |
|
| 2183 |
C CHECK FOR VALID N. |
| 2184 |
IF(N.LT.0) THEN |
| 2185 |
CALL WPSTER(802,5) |
| 2186 |
GOTO 999 |
| 2187 |
END IF |
| 2188 |
|
| 2189 |
C 2100 - PAGE FORMAT (0=LANDSCAPE,1=PORTRAIT) |
| 2190 |
IF (ESCPCD.EQ.2100) THEN |
| 2191 |
IF (ARGS(1).EQ.0) THEN |
| 2192 |
PGFORM=0 |
| 2193 |
ELSE |
| 2194 |
PGFORM=1 |
| 2195 |
ENDIF |
| 2196 |
ENDIF |
| 2197 |
|
| 2198 |
999 RETURN |
| 2199 |
END |
| 2200 |
SUBROUTINE WPSTIL (X,Y) |
| 2201 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2202 |
|
| 2203 |
C VILINA |
| 2204 |
|
| 2205 |
C D.L. CAMPBELL -1-DEC-1986 |
| 2206 |
C J.P. LONG -9-NOV-1987 |
| 2207 |
|
| 2208 |
C ENVIRONMENT -DEVICE DEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2209 |
|
| 2210 |
C ENTRY CONDITIONS -X,Y REAL NDC COORDINATES |
| 2211 |
|
| 2212 |
C CALLS - |
| 2213 |
|
| 2214 |
C EXIT CONDITIONS -CURRENT POSITION IS SET |
| 2215 |
|
| 2216 |
C NARRATIVE |
| 2217 |
C LINE-DRAW A LINE FROM CP TO ABSOLUTE NDC POSITION X,Y |
| 2218 |
C AND UPDATE CP . ATTRIBUTES COLOR,INTEN,LINSTY AND |
| 2219 |
C LINWTH APPLY. |
| 2220 |
|
| 2221 |
C OTHER VARIABLES: |
| 2222 |
C XCP,YCP-NDC COORDINATES |
| 2223 |
C*************************************************************************** |
| 2224 |
|
| 2225 |
REAL X,Y |
| 2226 |
|
| 2227 |
C draw |
| 2228 |
ENTRY WPST12(X,Y) |
| 2229 |
CALL WPST13(1,X,Y) |
| 2230 |
|
| 2231 |
RETURN |
| 2232 |
END |
| 2233 |
|
| 2234 |
SUBROUTINE WPST13(IPEN,X,Y) |
| 2235 |
c**************************************************** |
| 2236 |
c vbvect - do move or draw to x,y (depending on ipen) |
| 2237 |
|
| 2238 |
c ipen = 0 for move, 1 for draw |
| 2239 |
c x,y = NDC coordinates to be moved/drawn to |
| 2240 |
|
| 2241 |
c****************************************************** |
| 2242 |
|
| 2243 |
REAL X,Y,XOFF,YOFF |
| 2244 |
CHARACTER CTEMP*20,XCOORD*5,YCOORD*5 |
| 2245 |
REAL XSCALE,YSCALE |
| 2246 |
COMMON /WPST08/ XSCALE,YSCALE |
| 2247 |
INTEGER XPAD,YPAD,XDEVIC,YDEVIC |
| 2248 |
COMMON /WPST09/ XPAD,YPAD,XDEVIC,YDEVIC |
| 2249 |
REAL XCP,YCP |
| 2250 |
COMMON /WPST05/ XCP,YCP |
| 2251 |
REAL VECTOR(7) |
| 2252 |
COMMON /WPST03/ VECTOR |
| 2253 |
COMMON /WPST11/ IVECT,COORD |
| 2254 |
CHARACTER COORD*20 |
| 2255 |
INTEGER IVECT |
| 2256 |
|
| 2257 |
c compute new point in dev. coord. |
| 2258 |
c convert to floating offsets |
| 2259 |
XOFF=XPAD |
| 2260 |
YOFF=YPAD |
| 2261 |
|
| 2262 |
IXDC=X*XSCALE+XOFF |
| 2263 |
IYDC=Y*YSCALE+YOFF |
| 2264 |
|
| 2265 |
c write(xcoord,'(i5)')ixdc |
| 2266 |
c write(ycoord,'(i5)')iydc |
| 2267 |
c ...include both x,y |
| 2268 |
CALL CDRI2C(IXDC,4,XCOORD) |
| 2269 |
CALL CDRI2C(IYDC,4,YCOORD) |
| 2270 |
COORD = XCOORD(1:3)//'.'//XCOORD(4:4)//' '// |
| 2271 |
1 YCOORD(1:3)//'.'//YCOORD(4:4) |
| 2272 |
|
| 2273 |
c pack up move/draw command, send it down |
| 2274 |
IF (IPEN.EQ.0) THEN |
| 2275 |
CTEMP= COORD(1:11) // ' m ' |
| 2276 |
ELSE |
| 2277 |
CTEMP= COORD(1:11) // ' l ' |
| 2278 |
ENDIF |
| 2279 |
CALL WPST15(14,CTEMP) |
| 2280 |
c ...count the coordinate pair |
| 2281 |
IVECT=IVECT+1 |
| 2282 |
|
| 2283 |
c stroke the path if we are approaching the 1500-coord pair limit |
| 2284 |
c also restore and save postscript environment to avoid |
| 2285 |
c input buffer overflow (must have a c/r between restore |
| 2286 |
c and save) |
| 2287 |
IF(IVECT.GT.1400) THEN |
| 2288 |
CALL WPST15(4,'s r ') |
| 2289 |
CALL WPST15(0,' ') |
| 2290 |
CALL WPST15(4,'v o ') |
| 2291 |
CALL WPSTLW(VECTOR(5)) |
| 2292 |
c ...reset the vector count - vdstls (called by vdstlw) |
| 2293 |
c reinitted the current posn |
| 2294 |
IVECT=1 |
| 2295 |
ENDIF |
| 2296 |
|
| 2297 |
C UPDATE CURRENT POSITION |
| 2298 |
XCP=X |
| 2299 |
YCP=Y |
| 2300 |
|
| 2301 |
RETURN |
| 2302 |
END |
| 2303 |
SUBROUTINE WPSTIX(LENGT1,CHARS) |
| 2304 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2305 |
|
| 2306 |
C VITEXT - Text from Array. |
| 2307 |
|
| 2308 |
C P. Watterberg - 24 MAR 81 |
| 2309 |
C J. P. LONG - 3 DEC 87 |
| 2310 |
|
| 2311 |
C ENVIRONMENT - COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2312 |
|
| 2313 |
C ENTRY CONDITIONS - LENGT1 = integer number of characters in CHARS. |
| 2314 |
C Range 1-136. |
| 2315 |
C CHARS = integer array of ASCII characters, one |
| 2316 |
C character per array element, right justified. |
| 2317 |
C Range 8,10,32-126. |
| 2318 |
|
| 2319 |
C CALLS - vbout |
| 2320 |
|
| 2321 |
C EXIT CONDITIONS - XCP,YCP = integer updated current position (at the end |
| 2322 |
C of the string). |
| 2323 |
|
| 2324 |
C NARRATIVE - Draw LENGT1 characters in CHARS, starting at |
| 2325 |
C current position and update current position to |
| 2326 |
C the point after the last character box where the |
| 2327 |
C next character would begin. Current position |
| 2328 |
C indicates the lower left corner of the first |
| 2329 |
C character box. Only printable characters (32-126 |
| 2330 |
C decimal) and backspace and linefeed are allowed. |
| 2331 |
C All values in this range must produce "reasonable" |
| 2332 |
C output; mapping lower; case to upper case letters is |
| 2333 |
C considered reasonable. Attributes foreground color, |
| 2334 |
C background color, intensity, and character size |
| 2335 |
C apply. |
| 2336 |
|
| 2337 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2338 |
|
| 2339 |
INTEGER LENGT1, CHARS(136), LENGTH |
| 2340 |
|
| 2341 |
INTEGER XPAD,YPAD,XDEVIC,YDEVIC |
| 2342 |
COMMON /WPST09/ XPAD,YPAD,XDEVIC,YDEVIC |
| 2343 |
CHARACTER CTEMP*150,STR*3 |
| 2344 |
REAL XCP,YCP |
| 2345 |
COMMON /WPST05/ XCP,YCP |
| 2346 |
REAL VECTOR(7) |
| 2347 |
COMMON /WPST03/ VECTOR |
| 2348 |
REAL XSCALE,YSCALE |
| 2349 |
COMMON /WPST08/ XSCALE,YSCALE |
| 2350 |
|
| 2351 |
c check for valid length. |
| 2352 |
|
| 2353 |
LENGTH = LENGT1 |
| 2354 |
IF(LENGTH.LT.1) THEN |
| 2355 |
CALL WPSTER(212,5) |
| 2356 |
GO TO 999 |
| 2357 |
END IF |
| 2358 |
|
| 2359 |
c if(length.gt.136) then call vberrh(213,5), and use the |
| 2360 |
c maximum length of 136. |
| 2361 |
|
| 2362 |
IF(LENGTH.GT.136) THEN |
| 2363 |
CALL WPSTER(213,5) |
| 2364 |
LENGTH = 136 |
| 2365 |
ENDIF |
| 2366 |
|
| 2367 |
CTEMP='(' |
| 2368 |
LENOUT=1 |
| 2369 |
|
| 2370 |
c loop through length characters. |
| 2371 |
|
| 2372 |
DO 100 I=1,LENGTH |
| 2373 |
|
| 2374 |
c check for valid chars. |
| 2375 |
|
| 2376 |
c ignore control characters, except for: |
| 2377 |
c 8 is backspace |
| 2378 |
c 10 is linefeed |
| 2379 |
c 13 is carriage return |
| 2380 |
|
| 2381 |
IF(CHARS(I).LT.32 .OR. CHARS(I).GT.126) THEN |
| 2382 |
|
| 2383 |
IF(CHARS(I).EQ.8) THEN |
| 2384 |
DX=-VECTOR(7) |
| 2385 |
DY=0. |
| 2386 |
ELSE IF(CHARS(I).EQ.10) THEN |
| 2387 |
DX=0. |
| 2388 |
DY= -VECTOR(6) |
| 2389 |
ELSE IF(CHARS(I).EQ.13) THEN |
| 2390 |
DX=XPAD-XCP |
| 2391 |
DY=0. |
| 2392 |
ELSE |
| 2393 |
DX=0. |
| 2394 |
DY=0. |
| 2395 |
CALL WPSTER(208,5) |
| 2396 |
GOTO 100 |
| 2397 |
ENDIF |
| 2398 |
|
| 2399 |
c finish the string, emulate the control char, and start a new one |
| 2400 |
|
| 2401 |
c send the buffered chars to the printer if there are any |
| 2402 |
IF(LENOUT.NE.1) THEN |
| 2403 |
CTEMP=CTEMP(1:LENOUT)//') t ' |
| 2404 |
LENOUT=LENOUT+4 |
| 2405 |
CALL WPST15(LENOUT,CTEMP) |
| 2406 |
C reset the cp from the characters |
| 2407 |
XCP=XCP+(LENOUT-5)*VECTOR(7) |
| 2408 |
ENDIF |
| 2409 |
|
| 2410 |
c calculate the new current position after the control char |
| 2411 |
XCP=XCP+DX |
| 2412 |
YCP=YCP+DY |
| 2413 |
CALL WPST13(0,XCP,YCP) |
| 2414 |
|
| 2415 |
c start a new string |
| 2416 |
CTEMP='(' |
| 2417 |
LENOUT=1 |
| 2418 |
|
| 2419 |
ELSE |
| 2420 |
|
| 2421 |
c Char value is 32-126 inclusive. Put \ before these: |
| 2422 |
c 92 is \ |
| 2423 |
c 40 is ( |
| 2424 |
c 41 is ) |
| 2425 |
|
| 2426 |
IF(CHARS(I).EQ.40.OR.CHARS(I).EQ.41.OR.CHARS(I).EQ.92) THEN |
| 2427 |
CTEMP=CTEMP(1:LENOUT)//char(92) |
| 2428 |
LENOUT=LENOUT+1 |
| 2429 |
ENDIF |
| 2430 |
|
| 2431 |
c now pack the chars into the buffer |
| 2432 |
|
| 2433 |
CALL CDRA2C(CHARS(I),STR) |
| 2434 |
CTEMP=CTEMP(1:LENOUT)//STR(1:1) |
| 2435 |
LENOUT=LENOUT+1 |
| 2436 |
ENDIF |
| 2437 |
|
| 2438 |
100 CONTINUE |
| 2439 |
|
| 2440 |
c send the chars to the printer |
| 2441 |
|
| 2442 |
CTEMP=CTEMP(1:LENOUT)//') t ' |
| 2443 |
LENOUT=LENOUT+4 |
| 2444 |
CALL WPST15(LENOUT,CTEMP) |
| 2445 |
|
| 2446 |
C reset the cp from the characters |
| 2447 |
|
| 2448 |
XCP=XCP+(LENOUT-5)*VECTOR(7) |
| 2449 |
|
| 2450 |
999 RETURN |
| 2451 |
END |
| 2452 |
SUBROUTINE WPSTLS(LINSTY) |
| 2453 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2454 |
|
| 2455 |
C VDSTLS -Set Line Style. |
| 2456 |
|
| 2457 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2458 |
|
| 2459 |
C ENTRY CONDITIONS -LINSTY = integer linestyle of line drawing output |
| 2460 |
C primitives. Range 0-5. Default:0. |
| 2461 |
|
| 2462 |
C CALLS - |
| 2463 |
|
| 2464 |
C EXIT CONDITIONS -VECTOR(4) = real updated line style (LINSTY). |
| 2465 |
|
| 2466 |
C NARRATIVE -Set the style of line as below. This applies only |
| 2467 |
C to line drawing primitives. The line styles are: |
| 2468 |
C 0 - solid |
| 2469 |
C 1 - dotted |
| 2470 |
C 2 - dot dash |
| 2471 |
C 3 - short dash |
| 2472 |
C 4 - long dash |
| 2473 |
C 5 - medium dash |
| 2474 |
C All devices must support at least the values 0 and |
| 2475 |
C 5. If an unsupported value is specified, set to 5. |
| 2476 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2477 |
|
| 2478 |
REAL LW |
| 2479 |
INTEGER LINSTY,ILL,JLL |
| 2480 |
COMMON /WPST11/ IVECT,COORD |
| 2481 |
CHARACTER COORD*20 |
| 2482 |
INTEGER IVECT |
| 2483 |
CHARACTER CTEMP*30,STRL*3,STRS*3,STRG*3 |
| 2484 |
|
| 2485 |
REAL VECTOR(7) |
| 2486 |
COMMON /WPST03/ VECTOR |
| 2487 |
REAL XSCALE,YSCALE |
| 2488 |
COMMON /WPST08/ XSCALE,YSCALE |
| 2489 |
REAL XCP,YCP |
| 2490 |
COMMON /WPST05/ XCP,YCP |
| 2491 |
C CURRENT ATTRIBUTE VALUES. (DEVICE-INDEPENDENT) |
| 2492 |
C REAL VECTOR(7) |
| 2493 |
C COMMON /VCATTR/ VECTOR |
| 2494 |
|
| 2495 |
C VECTOR(1)=FOREGROUND COLOR |
| 2496 |
C (2)=BACKGROUND COLOR |
| 2497 |
C (3)=INTENSITY |
| 2498 |
C (4)=LINE STYLE |
| 2499 |
C (5)=LINE WIDTH |
| 2500 |
C (6)=CHARACTER BOX Y |
| 2501 |
C (7)=CHARACTER BOX X |
| 2502 |
|
| 2503 |
ENTRY WPST14(LINSTY) |
| 2504 |
|
| 2505 |
C CHECK FOR VALID LINSTY. |
| 2506 |
IF(LINSTY.LT.0.OR.LINSTY.GT.5) THEN |
| 2507 |
CALL WPSTER(401,5) |
| 2508 |
VECTOR(4) = 0 |
| 2509 |
GOTO 999 |
| 2510 |
END IF |
| 2511 |
|
| 2512 |
CALL WPST15(2,'s ') |
| 2513 |
C GENERATE THE LINESTYLE COMMANDS |
| 2514 |
IF(LINSTY.EQ.0) THEN |
| 2515 |
CALL WPST15(7,'[] 0 h ') |
| 2516 |
ENDIF |
| 2517 |
|
| 2518 |
c calculate the linewidth -- it's needed below in every case |
| 2519 |
|
| 2520 |
c actual xscale is xscale*.1; linewidth=1 => .01 in NDC |
| 2521 |
LW=VECTOR(5) |
| 2522 |
LW=XSCALE*VECTOR(5)*.001 |
| 2523 |
c a linewidth of zero isn't good with postscript |
| 2524 |
IF(LW.LT.1.) LW=1. |
| 2525 |
|
| 2526 |
c from here on, set; up patterns that depend on the linewidth and |
| 2527 |
c the extra length added to the line segment |
| 2528 |
c by the hemispherical end cap |
| 2529 |
|
| 2530 |
IF(LINSTY.EQ.1) THEN |
| 2531 |
ILL=NINT(0.5*LW) |
| 2532 |
IGAP=NINT(3.*LW) |
| 2533 |
CALL CDRI2C(ILL,3,STRL) |
| 2534 |
CALL CDRI2C(IGAP,3,STRG) |
| 2535 |
CTEMP='['//STRL(1:3)//' '//STRG(1:3)//'] 0 h ' |
| 2536 |
CALL WPST15(14,CTEMP) |
| 2537 |
|
| 2538 |
ELSE IF(LINSTY.EQ.2) THEN |
| 2539 |
ILL=NINT(18.*LW) |
| 2540 |
JLL=NINT(1.5*LW) |
| 2541 |
IGAP=NINT(3.*LW) |
| 2542 |
CALL CDRI2C(ILL,3,STRL) |
| 2543 |
CALL CDRI2C(JLL,3,STRS) |
| 2544 |
CALL CDRI2C(IGAP,3,STRG) |
| 2545 |
CTEMP='['//STRS(1:3)//' '//STRG(1:3)//' '//STRL(1:3) |
| 2546 |
* //' '//STRG(1:3)//'] 0 h ' |
| 2547 |
CALL WPST15(22,CTEMP) |
| 2548 |
c call pstbuf(14,'[2 2 6 2] 0 h ') |
| 2549 |
|
| 2550 |
ELSE IF(LINSTY.EQ.3) THEN |
| 2551 |
ILL=NINT(6.*LW) |
| 2552 |
IGAP=NINT(7.*LW) |
| 2553 |
CALL CDRI2C(ILL,3,STRL) |
| 2554 |
CALL CDRI2C(IGAP,3,STRG) |
| 2555 |
CTEMP='['//STRL(1:3)//' '//STRG(1:3)//'] 0 h ' |
| 2556 |
CALL WPST15(14,CTEMP) |
| 2557 |
c call pstbuf(8,'[4] 0 h ') |
| 2558 |
|
| 2559 |
ELSE IF(LINSTY.EQ.4) THEN |
| 2560 |
ILL=NINT(24.*LW) |
| 2561 |
IGAP=NINT(18.*LW) |
| 2562 |
CALL CDRI2C(ILL,3,STRL) |
| 2563 |
CALL CDRI2C(IGAP,3,STRG) |
| 2564 |
CTEMP='['//STRL(1:3)//' '//STRG(1:3)//'] 0 h ' |
| 2565 |
CALL WPST15(14,CTEMP) |
| 2566 |
c call pstbuf(8,'[8] 0 h ') |
| 2567 |
|
| 2568 |
ELSE IF(LINSTY.EQ.5) THEN |
| 2569 |
ILL=NINT(12.*LW) |
| 2570 |
IGAP=NINT(10.*LW) |
| 2571 |
CALL CDRI2C(ILL,3,STRL) |
| 2572 |
CALL CDRI2C(IGAP,3,STRG) |
| 2573 |
CTEMP='['//STRL(1:3)//' '//STRG(1:3)//'] 0 h ' |
| 2574 |
CALL WPST15(14,CTEMP) |
| 2575 |
|
| 2576 |
ENDIF |
| 2577 |
|
| 2578 |
c redefine the postscript current position |
| 2579 |
|
| 2580 |
c the code below is equivalent to |
| 2581 |
c call vbvect(0,xcp,ycp) |
| 2582 |
c but can't do it because vbvect calls vdstlw which calls this routine |
| 2583 |
|
| 2584 |
CTEMP=COORD(1:11)//' m ' |
| 2585 |
CALL WPST15(14,CTEMP) |
| 2586 |
|
| 2587 |
VECTOR(4)=LINSTY |
| 2588 |
|
| 2589 |
999 RETURN |
| 2590 |
END |
| 2591 |
SUBROUTINE WPSTCS(YSIZE) |
| 2592 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2593 |
|
| 2594 |
C VDSTCS -Set Character Size. |
| 2595 |
|
| 2596 |
C R.W.Simons -05DEC80 |
| 2597 |
C J. P. LONG -03 DEC 87 |
| 2598 |
|
| 2599 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2600 |
C All Devices that support only software characters. |
| 2601 |
C (LXY, HC1) |
| 2602 |
|
| 2603 |
C ENTRY CONDITIONS -YSIZE = real Y dimension of the character box in NDC |
| 2604 |
C space. Range 0.-1. Default: device dependent, |
| 2605 |
C typically the smallest hardware size. |
| 2606 |
|
| 2607 |
C CALLS - |
| 2608 |
|
| 2609 |
C EXIT CONDITIONS -VECTOR(6) = real updated character box Y (YSIZE). |
| 2610 |
C VECTOR(7) = real updated character box X. |
| 2611 |
|
| 2612 |
C NARRATIVE -Set the character size for text primitives. Size |
| 2613 |
C is given by YSIZE as the Y dimension of the |
| 2614 |
C character box. The SVDI will assign the X dimension |
| 2615 |
C of the character box and X and Y character size |
| 2616 |
C within the box according to the font used. Applies |
| 2617 |
C only to text primitives. |
| 2618 |
C All devices must support at least a single device |
| 2619 |
C dependent value that is the default. If an |
| 2620 |
C unsupported value is specified, set to the largest |
| 2621 |
C supported character size that does not exceed the |
| 2622 |
C specified size. |
| 2623 |
|
| 2624 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2625 |
|
| 2626 |
REAL YSIZE |
| 2627 |
CHARACTER STR*6,CTEMP*10 |
| 2628 |
|
| 2629 |
REAL VECTOR(7) |
| 2630 |
COMMON /WPST03/ VECTOR |
| 2631 |
REAL XSCALE,YSCALE |
| 2632 |
COMMON /WPST08/ XSCALE,YSCALE |
| 2633 |
|
| 2634 |
C CHECK FOR VALID YSIZE. |
| 2635 |
IF(YSIZE.LT.0.0.OR.YSIZE.GT.1.0) THEN |
| 2636 |
CALL WPSTER(401,5) |
| 2637 |
GOTO 999 |
| 2638 |
END IF |
| 2639 |
|
| 2640 |
C PROTECT INPUT PARAMETER FROM BEING CHANGED. |
| 2641 |
YSIZE1=YSIZE |
| 2642 |
|
| 2643 |
C DON'T ALLOW VALUES BELOW THE MINIMUM "HARDWARE" SIZE. |
| 2644 |
IF(YSIZE1.LT.0.01) YSIZE1=0.01 |
| 2645 |
|
| 2646 |
C VALUES ESTABLISHED HERE ARE USED BY VBSIM IN SIMULATING CHARACTERS. |
| 2647 |
C ALWAYS USE A CHARACTER ASPECT RATIO OF 5/7. |
| 2648 |
VECTOR(6)=YSIZE1 |
| 2649 |
VECTOR(7)=YSIZE1*5./7. |
| 2650 |
|
| 2651 |
C convert the character size into device coords |
| 2652 |
|
| 2653 |
IYSIZE=NINT(XSCALE*YSIZE1) |
| 2654 |
|
| 2655 |
c output the postscript command |
| 2656 |
|
| 2657 |
CALL CDRI2C(IYSIZE,4,STR) |
| 2658 |
c iysize is in tenths of device units |
| 2659 |
CTEMP='y '//STR(1:3)//' x ' |
| 2660 |
CALL WPST15(8,CTEMP) |
| 2661 |
|
| 2662 |
999 RETURN |
| 2663 |
END |
| 2664 |
SUBROUTINE WPSTLW(LINWTH) |
| 2665 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2666 |
|
| 2667 |
C VDSTLW -Set Line Width. |
| 2668 |
|
| 2669 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2670 |
|
| 2671 |
C ENTRY CONDITIONS -LINWTH = real line width of line drawing output |
| 2672 |
C primitives. Range 0.-1. Default: device dependent. |
| 2673 |
|
| 2674 |
C CALLS - |
| 2675 |
|
| 2676 |
C EXIT CONDITIONS -VECTOR(5) = real updated line width (LINWTH). |
| 2677 |
|
| 2678 |
C NARRATIVE -Set the relative width of an output line. Values |
| 2679 |
C are 0.-1. with 1. being .01 in NDC space. |
| 2680 |
C All devices must support at least a single device |
| 2681 |
C dependent value that is the default. If an |
| 2682 |
C unsupported value is specified, set to the closest |
| 2683 |
C supported line width. |
| 2684 |
|
| 2685 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2686 |
|
| 2687 |
REAL LINWTH,LW |
| 2688 |
CHARACTER CTEMP*19,STR*5 |
| 2689 |
|
| 2690 |
INTEGER*4 KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW,KBAUD, |
| 2691 |
1KCOMTP |
| 2692 |
COMMON /CDRCOM/ KWRTFL,KRDFL,KOUTFL,KINFL,KWRDSZ,KBYTEL,KCPW, |
| 2693 |
1 KBAUD,KCOMTP |
| 2694 |
REAL VECTOR(7) |
| 2695 |
COMMON /WPST03/ VECTOR |
| 2696 |
REAL XSCALE,YSCALE |
| 2697 |
COMMON /WPST08/ XSCALE,YSCALE |
| 2698 |
|
| 2699 |
C CHECK FOR VALID LINWTH. |
| 2700 |
IF(LINWTH.LT.0.0.OR.LINWTH.GT.1.) THEN |
| 2701 |
CALL WPSTER(401,5) |
| 2702 |
GOTO 999 |
| 2703 |
END IF |
| 2704 |
|
| 2705 |
C CONVERT LINE-WIDTH TO NDC |
| 2706 |
LW=LINWTH*.01 |
| 2707 |
|
| 2708 |
C CONVERT WIDTH TO DEVICE COORDINATES AND ADD A DIGIT; NEED IT; TO HUNDREDTHS |
| 2709 |
ILW=NINT(XSCALE*LW*10.) |
| 2710 |
C A LINEWIDTH OF ZERO WORKS ONLY PART OF THE TIME |
| 2711 |
IF(ILW.LT.10) ILW=10 |
| 2712 |
|
| 2713 |
C SET LINE WIDTH |
| 2714 |
CALL CDRI2C(ILW,5,STR) |
| 2715 |
CTEMP='s '//STR(1:3)//'.'//STR(4:5)//' w ' |
| 2716 |
CALL WPST15(11,CTEMP) |
| 2717 |
|
| 2718 |
VECTOR(5)=LINWTH |
| 2719 |
|
| 2720 |
c since linestyle uses the linewidth in setting the pattern, call it |
| 2721 |
|
| 2722 |
LINSTY=VECTOR(4) |
| 2723 |
CALL WPST14(LINSTY) |
| 2724 |
999 RETURN |
| 2725 |
END |
| 2726 |
SUBROUTINE WPSTIE(ESCPCD,SUPPRT) |
| 2727 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2728 |
|
| 2729 |
C VDIQES -Inquire Escape. |
| 2730 |
|
| 2731 |
C ENVIRONMENT -COMPUTER-INDEPENDENT, SYSTEM-INDEPENDENT, FORTRAN 77 |
| 2732 |
|
| 2733 |
C ENTRY CONDITIONS -ESCPCD = integer escape function code. |
| 2734 |
|
| 2735 |
C CALLS - |
| 2736 |
|
| 2737 |
C EXIT CONDITIONS -SUPPRT = integer level of support for the escape |
| 2738 |
C function specified. Range 0,1,2. |
| 2739 |
|
| 2740 |
C NARRATIVE -An integer value indicating 2=hardware supported, |
| 2741 |
C 1=software supported, 0=unsupported is returned in |
| 2742 |
C SUPPRT for the escape function ESCPCD. |
| 2743 |
|
| 2744 |
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C |
| 2745 |
|
| 2746 |
INTEGER ESCPCD,SUPPRT |
| 2747 |
IF (ESCPCD.EQ.2100) THEN |
| 2748 |
SUPPRT=2 |
| 2749 |
C ELSE THERE IS NO SUPPORT OF ANY OTHER ESCAPE CODES |
| 2750 |
ELSE |
| 2751 |
SUPPRT=0 |
| 2752 |
END IF |
| 2753 |
RETURN |
| 2754 |
END |