| 1 |
C Copyright(C) 1999-2020 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======================================================================= |
| 8 |
SUBROUTINE GRGPAR (PARTYP, INDEV, IPARMS, IPSTR) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** GRGPAR *** (GRPLIB) Get graphics parameters |
| 12 |
C -- Written by Amy Gilkey - revised 04/11/88 |
| 13 |
C -- |
| 14 |
C --GRGPAR gets information specified by PARTYP about a graphics device. |
| 15 |
C -- DEVICE - select current device |
| 16 |
C -- SNAP - set the number of frame snaps |
| 17 |
C -- FONT - select font to use |
| 18 |
C -- SOFTCHAR - select software or hardware characters |
| 19 |
C -- COLOR - select number of standard colors to use |
| 20 |
C -- SPECTRUM - select number of spectrum colors to use |
| 21 |
C -- AUTO - set automatic plotting |
| 22 |
C -- |
| 23 |
C --Parameters: |
| 24 |
C -- INDEV - IN - the device for which information is requested; |
| 25 |
C -- 0 for current device |
| 26 |
C -- PARTYP - IN - the parameter type (as above) |
| 27 |
C -- IPARMS - OUT - the parameter values (dependent on PARTYP) |
| 28 |
C -- for DEVICE - true iff device exists |
| 29 |
C -- for SNAP - the number of frames to snap |
| 30 |
C -- for FONT - the font to use |
| 31 |
C -- for SOFTCHAR - true iff software characters |
| 32 |
C -- for COLOR - the number of standard colors to use and the |
| 33 |
C -- maximum number of colors |
| 34 |
C -- for SPECTRUM - the number of alternate colors to use and the |
| 35 |
C -- maximum number of colors and the map type |
| 36 |
C -- for AUTO - true iff automatic plotting |
| 37 |
C -- IPARMS - OUT - the parameter string (dependent on PARTYP) |
| 38 |
C -- for DEVICE - device name |
| 39 |
C -- for SNAP - not set |
| 40 |
C -- for FONT - the font type |
| 41 |
C -- for SOFTCHAR - "software" or "hardware" |
| 42 |
C -- for COLOR, SPECTRUM - the color map type "standard" or "spectrum" |
| 43 |
C -- for AUTO - "automatic" or "user-directed" |
| 44 |
C -- |
| 45 |
C --Common Variables: |
| 46 |
C -- Uses ICURDV, DEVOK, DEVNAM, NSNAP, IFONT, SOFTCH, AUTOPL, |
| 47 |
C -- MAXCOL, NUMCOL, MAPALT of /GRPCOM/ |
| 48 |
|
| 49 |
include 'grpcom.blk' |
| 50 |
|
| 51 |
CHARACTER*(*) PARTYP |
| 52 |
INTEGER INDEV |
| 53 |
INTEGER IPARMS(*) |
| 54 |
CHARACTER*(*) IPSTR |
| 55 |
|
| 56 |
IF ((INDEV .NE. 1) .AND. (INDEV .NE. 2)) THEN |
| 57 |
IDEV = ICURDV |
| 58 |
ELSE |
| 59 |
IDEV = INDEV |
| 60 |
END IF |
| 61 |
|
| 62 |
IF (PARTYP .EQ. 'DEVICE') THEN |
| 63 |
IF (DEVOK(IDEV)) THEN |
| 64 |
CALL CPYLOG (1, .TRUE., IPARMS(1)) |
| 65 |
IPSTR = DEVNAM(IDEV) |
| 66 |
ELSE |
| 67 |
CALL CPYLOG (1, .FALSE., IPARMS(1)) |
| 68 |
IPSTR = ' ' |
| 69 |
END IF |
| 70 |
|
| 71 |
ELSE IF (PARTYP .EQ. 'SNAP') THEN |
| 72 |
IPARMS(1) = NSNAP(IDEV) |
| 73 |
|
| 74 |
ELSE IF (PARTYP .EQ. 'FONT') THEN |
| 75 |
IPARMS(1) = IFONT(IDEV) |
| 76 |
IF (IFONT(IDEV) .EQ. 1) THEN |
| 77 |
IPSTR = 'stick' |
| 78 |
ELSE IF (IFONT(IDEV) .EQ. 2) THEN |
| 79 |
IPSTR = 'sanserif' |
| 80 |
ELSE IF (IFONT(IDEV) .EQ. 3) THEN |
| 81 |
IPSTR = 'Roman' |
| 82 |
ELSE |
| 83 |
IPSTR = ' ' |
| 84 |
END IF |
| 85 |
|
| 86 |
ELSE IF (PARTYP .EQ. 'SOFTCHAR') THEN |
| 87 |
CALL CPYLOG (1, SOFTCH(IDEV), IPARMS(1)) |
| 88 |
IF (SOFTCH(IDEV)) THEN |
| 89 |
IPSTR = 'software' |
| 90 |
ELSE |
| 91 |
IPSTR = 'hardware' |
| 92 |
END IF |
| 93 |
|
| 94 |
ELSE IF (PARTYP .EQ. 'COLOR') THEN |
| 95 |
IPARMS(1) = NUMCOL(0,IDEV) |
| 96 |
IPARMS(2) = MIN (6, MAXCOL(IDEV)) |
| 97 |
IPARMS(3) = 0 |
| 98 |
IPSTR = 'standard' |
| 99 |
|
| 100 |
ELSE IF (PARTYP .EQ. 'SPECTRUM') THEN |
| 101 |
IPARMS(3) = MAPALT(IDEV) |
| 102 |
IF (MAPALT(IDEV) .EQ. 0) THEN |
| 103 |
IPARMS(1) = NUMCOL(0,IDEV) |
| 104 |
IPARMS(2) = MIN (6, MAXCOL(IDEV)) |
| 105 |
IPSTR = 'standard' |
| 106 |
ELSE IF (MAPALT(IDEV) .EQ. 1) THEN |
| 107 |
IPARMS(1) = NUMCOL(1,IDEV) |
| 108 |
IPARMS(2) = MAXCOL(IDEV) - 6 |
| 109 |
IPSTR = 'spectrum' |
| 110 |
ELSE |
| 111 |
IPARMS(1) = 0 |
| 112 |
IPARMS(2) = MAXCOL(IDEV) |
| 113 |
IPSTR = 'invalid' |
| 114 |
END IF |
| 115 |
|
| 116 |
ELSE IF (PARTYP .EQ. 'AUTO') THEN |
| 117 |
CALL CPYLOG (1, AUTOPL(IDEV), IPARMS(1)) |
| 118 |
IF (AUTOPL(IDEV)) THEN |
| 119 |
IPSTR = 'automatic' |
| 120 |
ELSE |
| 121 |
IPSTR = 'user-directed' |
| 122 |
END IF |
| 123 |
END IF |
| 124 |
|
| 125 |
RETURN |
| 126 |
END |