The PHIGS standard defines a set of functions and data types that are independent of any particular programming language. As explained in Section 1.2.2, these functions and data types need to be represented in terms of the facilities of a particular programming language, in order that PHIGS can be used in a standardized way by an application using that language. This is the purpose of the PHIGS language binding standard IS 9593.
IS 9593 is a multi-part standard, each part of which describes the binding to a particular programming language. Part 1 describes the Fortran binding, Part 2 the Pascal binding, Part 3 the Ada binding and Part 4 the C binding. At the time of writing, only the Fortran and Ada bindings have been published as International Standards. The C binding is a Draft International Standard (October 1990), and the Pascal binding lags considerably behind.
The remainder of this chapter describes the essential features of the Fortran language binding, to the level of detail necessary to enable a programmer to use the functions described in this book, through the Fortran binding. Readers should be aware that the Fortran binding which was eventually standardized, had some significant differences from early drafts. Several of the PHIGS implementations on the market use an early version of the Fortran binding. It is wise to consider which language binding is actually used when purchasing a PHIGS implementation.
The Fortran binding defines a set of Fortran subroutines and parameters which correspond to the PHIGS functions. With the exception of some of the inquiry functions, there is one subroutine per PHIGS function. Inquiry functions are omitted from this chapter, and the reader is referred either to the Fortran language binding itself, or to the documentation of the PHIGS implementation used for details of these.
Table 1 gives the Fortran subroutine names corresponding to the major PHIGS functions and their arguments. The functions are listed in alphabetical order.
In view of the large number of functions described in this chapter, an abbreviated notation is used for describing parameter lists. Each function description consists of the name of the function and a reference to the section of the book in which it is described. The Fortran subroutine name and parameter list appear on the second line. Input parameters are indicated in a roman typeface, and output parameters in italic. Table 2 gives the meanings of the names used in the parameter lists and the corresponding Fortran data types. The names are listed in alphabetical order. In a few instances parameter names with lengths greater than 6 characters have been used in the interests of clarity. This is mainly the addition of the character '3' to distinguish between the parameter names for corresponding 2D and 3D functions. The type ENUMERATION means that the type is a set of enumerated values. As described below, these types are represented as INTEGERs. The emphasised names in the right-hand column of Table 2, are the names of the corresponding entries in Table 3, which give the correspondence between these types and INTEGER values.
Dimensions of array parameters are indicated in brackets after the array type, for example:
EVOL REAL (6)
means that the parameter EVOL is a real array with 6 elements.
The notation used in the earlier chapters of this book substituted variable names for the values of parameters which enumerate a number of possible options, for example, the variables CLIP and NOCLIP were used to represent particular values of clipping indicators. In the PHIGS Fortran language binding, enumerated values are represented as INTEGERs and the language binding standardizes names and INTEGER values for each PHIGS enumerated type. The names will be made available for use by the application, either by means of PARAMETER or DATA statements, the exact details of how the names are included in an application will vary from implementation to implementation. Table 3 gives the correspondence between enumerated types, INTEGER value, Fortran name and the names largely used in the earlier chapters of this book. For the type Element, only the first 5 values are shown. This type gives names to all the PHIGS structure elements, for the remaining values, the reader is referred to the documentation of the PHIGS implementation being used. Enumerated types used only by the INQUIRY functions have been omitted from this table.
Parameter Type Description AFID INTEGER archive file identifier APTHSZ INTEGER actual size of Nth structure path APX REAL x-annotation offset APY REAL y-annotation offset APZ REAL z-annotation offset ARCCR ENUMERATION archival conflict resolution ARCFIL INTEGER archive file name ASFVAL ENUMERATION aspect source flag value ASPCID ENUMERATION aspect identifier ASTYLE INTEGER annotation style ATALH ENUMERATION annotation text alignment horizontal ATALV ENUMERATION annotation text alignment vertical ATCHH REAL annotation text character height ATCHUX REAL x-annotation text character up vector ATCHUY REAL y-annotation text character up vector ATP ENUMERATION annotation text path BCLIPI ENUMERATION back clipping indicator BPLD REAL back plane distance BUFA INTEGER amount of memory units CHARS CHARACTER *(*) character string CHDNR INTEGER choice device number CHH REAL character height CHNR INTEGER choice number CHSP REAL character spacing CHUX REAL x-character up vector CHUY REAL y-character up vector CHXP REAL character expansion factor CI INTEGER colour index CMODEL INTEGER colour model COFL ENUMERATION control flag COLI INTEGER colour index COLIA INTEGER (DIMX,DIMY) colour index array CONID INTEGER connection identifier CPXA REAL (3) x-cell parallelogram CPYA REAL (3) y-cell parallelogram CPZA REAL (3) z-cell parallelogram CSPEC REAL (*) colour specification CTYPE ENUMERATION composition type DATREC CHARACTER *80(LDR) data record DEFMOD ENUMERATION deferral mode DIMX INTEGER dimension of array COLIA DIMY INTEGER dimension of array COLIA DX REAL x-shift vector DY REAL y-shift vector DZ REAL z-shift vector EDFLAG ENUMERATION on/off switch edge flag EDI INTEGER edge index EDITMO ENUMERATION edit mode EDTYPE INTEGER edgetype EES ENUMERATION (EESN) element exclusion set EESN INTEGER number of elements in exclusion set EIS ENUMERATION (EISN) element inclusion set EISN INTEGER number of elements in inclusion set EP,EP1,EP2 INTEGER element position EPO INTEGER element position offset ERHM ENUMERATION off/on switch error handling mode ERRFIL INTEGER error file ERRIND INTEGER error indicator ERRNR INTEGER error number ES INTEGER (ESN) exclusion set ESN INTEGER number of names in exclusion set ESW ENUMERATION echo switch EYOL REAL (6) echo volume EWIDTH REAL edgewidth scale factor FCLIPI ENUMERATION front clipping indicator FCTID INTEGER function identification FNDEP INTEGER found element position FONT INTEGER text font FPATH INTEGER (2,IPTHSZ) found path FPLD REAL front plane distance FPTHSZ INTEGER found path size FX REAL x-scale factor FY REAL y-scale factor FZ REAL z-scale factor GSEID INTEGER generalized structure element identifier HALFSP REAL (4,NHALFS) list of half-spaces HALFSP3 REAL (6,NHALFS) list of half-spaces HRID INTEGER HLHSR identifier HRM INTEGER HLHSR mode IA INTEGER (*) integer entries IAU INTEGER (IIL) integer entries ICHNR INTEGER initial choice number ICL ENUMERATION input class IDNR INTEGER logical input device number IDRL INTEGER item data record length IFLES INTEGER (*) inverted filter exclusion sets IFLESX INTEGER (IFLN) array of end indices of inverted filter exclusion sets IFLIS INTEGER (*) inverted filter inclusion sets IFLISX INTEGER (IFLN) array of end indices of inverted filter inclusion sets IFLN INTEGER number of inverted filters II INTEGER interior index IIL INTEGER dimension of integer array IIPPD INTEGER depth of initial pick path IL INTEGER number of integer entries ILSIZE INTEGER size of list (LSTRID) INP INTEGER number of points in initial stroke INTS ENUMERATION interior style IPP INTEGER (3,IPPD) initial pick path IPPD INTEGER depth of pick path to return IPTHSZ INTEGER size of path array IPX REAL x-initial locator position IPY REAL y-initial locator position IPZ REAL z-initial locator position IPXA REAL (*) x-initial stroke IPYA REAL (*) y-initial stroke IPZA REAL (*) z-initial stroke IRL INTEGER dimension of real array IS INTEGER (ISN) inclusion set ISC INTEGER index of start column ISL INTEGER dimension of character array ISN INTEGER number of names in inclusion set ISR INTEGER index of start row ISTAT ENUMERATION initial input device status ISTR CHARACTER *80 initial string ISTYLI INTEGER interior style index IVAL REAL initial value IVIEWI INTEGER initial view index IXA INTEGER (NPL) array of end indices for point lists LABEL INTEGER label identifier LABEL1 INTEGER label identifier LABEL2 INTEGER label identifier LCDNR INTEGER locator device number LDR INTEGER dimension of data record array LOSTR INTEGER number of characters returned LPX REAL x-locator position LPY REAL y-locator position LPZ REAL z-locator position LSTR INTEGER length of initial string LSTRID INTEGER (*) list of structure identifiers LSTRID INTEGER (N) list of structure identifiers LTYPE INTEGER linetype LWIDTH REAL linewidth scale factor MCLIPF ENUMERATION modelling clipping indicator MCLIPI ENUMERATION modelling clipping indicator MESS CHARACTER *(*) message MIDRL INTEGER maximum item data record length MLDR INTEGER dimension of data record MODE ENUMERATION operating mode MODMOD ENUMERATION modification mode MSZSF REAL marker size scale factor MTYPE INTEGER marker type N INTEGER array dimension NAMSET INTEGER (NSN) name set NCCS INTEGER number of components of colour specification NCOLS INTEGER number of columns NELM INTEGER element of list of paths NEWSID INTEGER resulting structure identifier NFLES INTEGER (*) normal filter exclusion sets NFLESX INTEGER (NFLN) array of end indices of normal filter exclusion sets NFLIS INTEGER (*) normal filter inclusion sets NFLISX INTEGER (NFLN) array of end indices of normal filter inclusion sets NFLN INTEGER number of normal filters NHALFS INTEGER number of half-spaces in list NP INTEGER number of points in stroke NPL INTEGER number of point lists NROWS INTEGER number of rows NSN INTEGER number of names in set NSTRID INTEGER number of structure identifiers in list OL INTEGER number of paths available OLDSID INTEGER original structure identifier OP INTEGER operator PACREC CHARACTER *80 (MLDR) data record PAI INTEGER pattern index PATHS INTEGER (2,IPTHSZ) Nth structure path PET INTEGER prompt and echo type PHI REAL rotation angle PHIX REAL x-rotation angle PHIY REAL y-rotation angle PHIZ REAL z-rotation angle PJRX REAL x-projection reference point PJRY REAL y-projection reference point PJRZ REAL z-projection reference point PJTYPE ENUMERATION projection type PJVPLM REAL (4) projection viewport limits PJVPLM3 REAL (6) projection viewport limits PKDNR INTEGER pick device number PKID INTEGER pick identifier PLDR INTEGER number of elements used in PACREC PLI INTEGER polyline index PLSTR INTEGER (*) lengths of each character string entry PMI INTEGER polymarker index PP INTEGER (3,1PPD) pick path PPD INTEGER depth of actual pick path PPORDR ENUMERATION pick path order PREC ENUMERATION text precision PRIMID INTEGER GDP or GDP3 identifier PRIORT REAL display priority PSTR CHARACTER *(*)(*) character string entries PTHDEP INTEGER path depth PTHORD ENUMERATION path order PX REAL x-coordinate of position PXA REAL (*) x-coordinates of points PXAN REAL (N) x-coordinates of points PY REAL y-coordinate of position PYA REAL (*) y-coordinates of points PYAN REAL (N) y-coordinates of points PZ REAL z-coordinates of position PZA REAL (*) z-coordinate of position PZAN REAL (N) z-coordinates of points QX REAL x-coordinate of position QY REAL y-coordinate of position RA INTEGER (*) real entries RAU REAL (IRL) real entries REFHNF ENUMERATION reference handling flag REGFL ENUMERATION reference flag RELPRI ENUMERATION relative input priority RETCR ENUMERATION retrieval conflict resolution RFVWIX INTEGER reference view index RFVX REAL (2) x-pattern reference vectors RFVY REAL (2) y-pattern reference vectors RFVZ REAL (2) z-pattern reference vectors RFX REAL x-pattern reference point RFY REAL y-pattern reference point RFZ REAL z-pattern reference point RL INTEGER number of real entries ROTANG REAL rotation angle RPX REAL x-reference point RPY REAL y-reference point RPZ REAL z-reference point SKDNR INTEGER stroke device number SL INTEGER number of character string entries SPATH INTEGER (2,SPTHSZ) starting path SPTHSZ INTEGER number of elements in starting path SRCDIR ENUMERATION search direction SRCHCI INTEGER search ceiling SRPX REAL x-search reference point SRPY REAL y-search reference point SRPZ REAL z-search reference point STAT ENUMERATION input device status STATUS ENUMERATION search success indicator STDNR INTEGER string device number STR CHARACTER *(*) string STRID INTEGER structure identifier STRTEP INTEGER start element position STYLI INTEGER interior style index SZX REAL x-pattern size SZY REAL y-pattern size TDX REAL (2) x-text direction vectors TDY REAL (2) y-text direction vectors TDZ REAL (2) z-text direction vectors TOUT REAL time out TXALH ENUMERATION text alignment horizontal TXALV ENUMERATION text alignment vertical TXI INTEGER text index TXP ENUMERATION text path TYPE INTEGER item type UACREC CHARACTER*80 (ULDR) data record ULDR INTEGER number of elements used in UACREC ULSTR INTEGER (ISL) length of each character string entry USTR CHARACTER *(*)(ISL) character string entries VAL REAL value VIEWI INTEGER view index VLDNR INTEGER valuator device number VPLD REAL view plane distance VPNX REAL x-view plane normal VPNY REAL y-view plane normal VPNZ REAL z-view plane normal VUPX REAL x-view up vector VUPY REAL y-view up vector VUPZ REAL z-view up vector VWCPLM REAL (4) view clipping limits VWCPLM3 REAL (6) view clipping limits VWMPMT REAL (3,3) view mapping matrix VWMPMT3 REAL (4,4) view mapping matrix VWORMT REAL (3,3) view orientation matrix VWORMT3 REAL (4,4) view orientation matrix VWRX REAL x-view reference point VWRY REAL y-view reference point VWRZ REAL z-view reference point VWWNLM REAL (4) window limits WKID INTEGER workstation identifier WKVP REAL (6) workstation viewport limits WKWN REAL (6) workstation window limits WTYPE INTEGER workstation type X0 REAL x-fixed point XFRMT REAL (3,3) transformation matrix XFRMT3 REAL (4,4) transformation matrix XFRMTA REAL (3,3) transformation matrix XFRMTA3 REAL (4,4) transformation matrix XFRMTB REAL (3,3) transformation matrix XFRMTB3 REAL (4,4) transformation matrix XFRMTI REAL (3,3) transformation matrix XFRMTI3 REAL (4,4) transformation matrix XFRMTO REAL (3,3) transformation matrix XFRMT03 REAL (4,4) transformation matrix XI REAL x-point XMAX REAL x-limit of region XMIN REAL x-limit of region XO REAL x-transformed point XYCLPI ENUMERATION x-y clipping indicator Y0 REAL y-fixed point YI REAL y-point YMAX REAL y-limit of region YMIN REAL y-limit of region YO REAL y-transformed point Z0 REAL z-fixed point ZI REAL z-point ZO REAL z-transformed point
Data type Value Fortran Name PHIGS Name Archive State 0 PARCL ARCL 1 PAROP AROP Aspect identifier 0 PLN LINETYPE 1 PLWSC LINEWIDTH_SCALE_ FACTOR 2 PPLCI POLYLINE_COLOUR_ INDEX 3 PMK MARKER_TYPE 4 PMKSC MARKERSIZE_SCALE_ FACTOR 5 PPMCI POLYMARKER_COLOUR_ INDEX 6 PTXFN TEXT_FONT 7 PTXPR TEXT_PRECISION 8 PCHXP CHARACTER_EXPANSION_ FACTOR 9 PCHSP CHARACTER_SPACING 10 PTXCI TEXT_COLOUR_INDEX 11 PIS INTERIOR_STYLE 12 PISI INTERIOR_STYLE_INDEX 13 PICI INTERIOR_COLOUR_INDEX 14 PEDFG EDGE_FLAG 15 PEDT EDGE_TYPE 16 PEWSC EDGE_WIDTH_SCALE_ FACTOR 17 PEDCI EDGE_COLOUR_INDEX Aspect source 0 PBUNDL BUNDLED 1 PINDIV INDIVIDUAL Clipping indicator 0 PNCLIP NOCLIP 1 PCLIP CLIP Composition type 0 PCPRE PRECONCATENATION 1 PCPOST POSTCONCATENATE 2 PCREPL REPLACE Conflict resolution 0 PCRMNT MAINTAIN 1 PCRABA ABANDON 2 PCRUPD UPDATE Control flag 0 PCONDI CONDITIONALLY 1 PALWAY ALWAYS Deferral mode 0 PASAP ASAP 1 PBNIG BNIG 2 PBNIL BNIL 3 PASTI ASTI 4 PWAITD WAIT Echo switch 0 PNECHO NOECHO 1 PECHO ECHO Edit mode 0 PINSRT INSERT 1 PREPLC REPLACE Element 0 PEALL ALL 1 PENIL NIL 2 PEPL3 POLYLINE_3 3 PEPL POLYLINE 4 PEPM3 POLYMARKER_3 5 PEPM POLYMARKER ............ Input class 0 PNCLAS NONE 1 PLOCAT LOCATOR 2 PSTROK STROKE 3 PVALUA VALUATOR 4 PCHOIC CHOICE 5 PPICK PICK 6 PSTRIN STRING Input device status 0 PNONE NONE 1 POK OK 2 PNPICK NOPICK 3 PNCHOI NOCHOICE Interior style 0 PHOLLO HOLLOW 1 PSOLID SOLID 2 PPATTR PATTERN 3 PHATCH HATCH 4 PISEMP EMPTY Modification mode 0 PNIVE NIVE 1 PUWOR UWOR 2 PUQUM UQUM Off/on switch 0 POFF OFF 1 PON ON Operating mode 0 PREQU REQUEST 1 PSAMPL SAMPLE 2 PEVENT EVENT Path order 0 PPOTOP TOPFIRST 1 PPOBOT BOTTOMFIRST Projection type 0 PPARL PARALLEL 1 PPERS PERSPECTIVE Reference handling 0 PDELE DELETE flag 1 PKEEP KEEP Regeneration flag 0 PPOSTP POSTPONE 1 PPERFO PERFORM Relative input 0 PHIGHR HIGHER priority 1 PLOWER LOWER Search direction 0 PBWD BACKWARD 1 PFWD FORWARD Search success 0 PFAIL FAILURE indicator 1 PSUCC SUCCESS Text alignment 0 PAHNOR NORMAL horizontal 1 PALEFT LEFT 2 PACENT CENTRE 3 PARITE RIGHT Text alignment 0 PAVNOR NORMAL vertical 1 PATOP TOP 2 PACAP CAP 3 PAHALF HALF 4 PABASE BASE 5 PABOTT BOTTOM Text path 0 PRIGHT RIGHT 1 PLEFT LEFT 2 PUP UP 3 PDOWN DOWN Text precision 0 PSTRP STRING 1 PCHARP CHAR 2 PSTRKP STROKE