Contact us Heritage collections Image license terms
HOME ACL ACD ICF SUS DCS G&A STARLINK Literature
Further reading □ OverviewContentsPrefaceNotation1. Introduction2. Graphical output3. Coordinates4. Segments and Attributes5. Input devices6. Interaction styles7. Workstations8. Environment9. Input control10. Segment storage11. Metafiles12. Further facilities13. Individual attributesA. AbbreviationsB. Language bindingC. Complete programIndex
C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACDLiteratureBooksGKS
ACDLiteratureBooksGKS
ACL ACD C&A INF CCD CISD Archives
Further reading

OverviewContentsPrefaceNotation1. Introduction2. Graphical output3. Coordinates4. Segments and Attributes5. Input devices6. Interaction styles7. Workstations8. Environment9. Input control10. Segment storage11. Metafiles12. Further facilities13. Individual attributesA. AbbreviationsB. Language bindingC. Complete programIndex

Appenidix B: Language Binding

GKS, itself. is defined independently of a programming language. Before it can be used from a particular language, a language binding must be defined for that language. At the time of writing, the FORTRAN (77) language binding is being submitted for registration as a Draft International Standard. Details of the language binding are listed in this appendix and this is the binding used throughout the book. INQUIRY functions are excluded from this appendix.

Corresponding to some GKS functions, the language binding contains two subroutines; one is for full FORTRAN 77, the other is for the FORTRAN 77 subset. This occurs whenever the GKS function contains a string parameter, because it is not possible in the FORTRAN 77 subset for a CHARACTER variable to have an unknown length. Throughout the book and in this appendix, only the full FORTRAN 77 version is shown.

In the examples in the book, the GKS names were substituted for the subroutine names in the language binding. In this appendix, the GKS names are listed on the left hand side and the FORTRAN 77 subroutine names on the right hand side. The functions are grouped according to their type in the same manner as in the GKS document. Tables 1 and 2 contain alphabetical lists of each set of names together with their corresponding names in the other set.

The parameters of each subroutine are listed with an indication of whether they are input (In) or output (Out), their type and their meaning. Some parameters specify a number of options, which in Pascal would be of enumeration type. In the FORTRAN 77 language binding, these are expressed as integers. The correspondence between the names used in the text and the integers in the language binding is given in Table 3. The FORTRAN 77 language binding defines names for these values, that should be made available, by means of PARAMETER or DATA statements, for inclusion in application programs (in an installation dependent manner). These names are listed in Table 4. Names used exclusively in INQUIRY functions are omitted.

Table 1
GKS Name FORTRAN 77 Name
ACCUMULATE TRANSFORMATION MATRIX GACTM
ACTIVATE WORKSTATION GACWK
ASSOCIATE SEGMENT WITH WORKSTATION GASGWK
AWAIT EVENT GWAIT
CELL ARRAY GCA
CLEAR WORKSTATION GCLRWK
CLOSE GKS GCLKS
CLOSE SEGMENT GCLSG
CLOSE WORKSTATION GCLWK
COPY SEGMENT TO WORKSTATION GCSGWK
CREATE SEGMENT GCRSG
DEACTIVATE WORKSTATION GDAWK
DELETE SEGMENT GDSG
DELETE SEGMENT FROM WORKSTATION GDSGWK
EMERGENCY CLOSE GKS GECLKS
ERROR HANDLING GERHND
ERROR LOGGING GERLOG
ESCAPE GESC
EVALUATE TRANSFORMATION MATRIX GEVTM
FILL AREA GFA
FLUSH DEVICE EVENTS GFLUSH
GENERALIZED DRAWING PRIMITIVE GGDP
GET CHOICE GGTCH
GET ITEM TYPE FROM GKSM GGTITM
GET LOCATOR GGTLC
GET PICK GGTPK
GET STRING GGTST
GET STROKE GGTSK
GET VALUATOR GGTVL
INITIALISE CHOICE GINCH
INITIALISE LOCATOR GINLC
INITIALISE PICK GINPK
INITIALISE STRING GINST
INITIALISE STROKE GINSK
INITIALISE VALUATOR GINVL
INSERT SEGMENT GINSG
INTERPRET ITEM GIITM
MESSAGE GMSG
OPEN GKS GOPKS
OPEN WORKSTATION GOPWK
PACK DATA RECORD (Language Binding) GPREC
POLYLINE GPL
POLYMARKER GPM
READ ITEM FROM GKSM GRDITM
REDRAW ALL SEGMENTS ON WORKSTATION GRSGWK
RENAME SEGMENT GRENSG
REQUEST CHOICE GRQCH
REQUEST LOCATOR GRQLC
REQUEST PICK GRQPK
REQUEST STRING GRQST
REQUEST STROKE GRQSK
REQUEST VALUATOR GRQVL
SAMPLE CHOICE GSMCH
SAMPLE LOCATOR GSMLC
SAMPLE PICK GSMPK
SAMPLE STRING GSMST
SAMPLE STROKE GSMSK
SAMPLE VALUATOR GSMVL
SELECT NORMALIZATION TRANSFORMATION GSELNT
SET ASPECT SOURCE FLAGS GSASF
SET CHARACTER EXPANSION FACTOR GSCHXP
SET CHARACTER HEIGHT GSCHH
SET CHARACTER SPACING GSCHSP
SET CHARACTER UP VECTOR GSCHUP
SET CHOICE MODE GSCHM
SET CLIPPING INDICATOR GSCLIP
SET COLOUR REPRESENTATION GSCR
SET DEFERRAL STATE GSDS
SET DETECTABILITY GSDTEC
SET FILL AREA COLOUR INDEX GSFACI
SET FILL AREA INDEX GSFAI
SET FILL AREA INTERIOR STYLE GSFAIS
SET FILL AREA REPRESENTATION GSFAR
SET FILL AREA STYLE INDEX GSFASI
SET HIGHLIGHTING GSHLIT
SET LINETYPE GSLN
SET LINEWIDTH SCALE FACTOR GSLWSC
SET LOCATOR MODE GSLCM
SET MARKER SIZE SCALE FACTOR GSMKSC
SET MARKER TYPE GSMK
SET PATTERN REFERENCE POINT GSPARF
SET PATTERN REPRESENTATION GSPAR
SET PATTERN SIZE GSPA
SET PICK IDENTIFIER GSPKID
SET PICK MODE GSPKM
SET POLYLINE COLOUR INDEX GSPLCI
SET POLYLINE INDEX GSPLI
SET POLYLINE REPRESENTATION GSPLR
SET POLYMARKER COLOUR INDEX GSPMCI
SET POLYMARKER INDEX GSPMI
SET POLYMARKER REPRESENTATION GSPMR
SET SEGMENT PRIORITY GSSGP
SET SEGMENT TRANSFORMATION GSSGT
SET STRING MODE GSSTM
SET STROKE MODE GSSKM
SET TEXT ALIGNMENT GSTXAL
SET TEXT COLOUR INDEX GSTXCI
SET TEXT FONT AND PRECISION GSTXFP
SET TEXT INDEX GSTXI
SET TEXT PATH GSTXP
SET TEXT REPRESENTATION GSTXR
SET VALUATOR MODE GSVLM
SET VIEWPORT GSVP
SET VIEWPORT INPUT PRIORITY GSVPIP
SET VISIBILITY GSVIS
SET WINDOW GSWN
SET WORKSTATION VIEWPORT GSWKVP
SET WORKSTATION WINDOW GSWKWN
TEXT GTX
UNPACK DATA RECORD (Language Binding) GUREC
UPATE WORKSTATION GUWK
WRITE ITEM TO GKSM GWITM
Table 2
FORTRAN 77 Name GKS Name
GACTM ACCUMULATE TRANSFORMATION MATRIX
GACWK ACTIVATE WORKSTATION
GASGWK ASSOCIATE SEGMENT WITH WORKSTATION
GCA CELL ARRAY
GCLKS CLOSE GKS
GCLRWK CLEAR WORKSTATION
GCLSG CLOSE SEGMENT
GCLWK CLOSE WORKSTATION
GCRSG CREATE SEGMENT
GCSGWK COPY SEGMENT TO WORKSTATION
GDAWK DEACTIVATE WORKSTATION
GDSG DELETE SEGMENT
GDSGWK DELETE SEGMENT FROM WORKSTATION
GECLKS EMERGENCY CLOSE GKS
GERHND ERROR HANDLING
GERLOG ERROR LOGGING
GESC ESCAPE
GEVTM EVALUATE TRANSFORMATION MATRIX
GFA FILL AREA
GFLUSH FLUSH DEVICE EVENTS
GGDP GENERALIZED DRAWING PRIMITIVE
GGTCH GET CHOICE
GGTITM GET ITEM TYPE FROM GKSM
GGTLC GET LOCATOR
GGTPK GET PICK
GGTSK GET STROKE
GGTST GET STRING
GGTVL GET VALUATOR
GIITM INTERPRET ITEM
GINCH INITIALISE CHOICE
GINLC INITIALISE LOCATOR
GINPK INITIALISE PICK
GINSG INSERT SEGMENT
GINSK INITIALISE STROKE
GINST NITIALISE STRING
GINVL INITIALISE VALUATOR
GMSG MESSAGE
GOPKS OPEN GKS
GOPWK OPEN WORKSTATION
GPL POLYLINE
GPM POLYMARKER
GPREC PACK DATA RECORD (Language Binding)
GRDITM READ ITEM FROM GKSM
GRENSG RENAME SEGMENT
GRQCH REQUEST CHOICE
GRQLC REQUEST LOCATOR
GRQPK REQUEST PICK
GRQSK REQUEST STROKE
GRQST REQUEST STRING
GRQVL REQUEST VALUATOR
GRSGWK REDRAW ALL SEGMENTS ON WORKSTATION
GSASF SET ASPECT SOURCE FLAGS
GSCHH SET CHARACTER HEIGHT
GSCHM SET CHOICE MODE
GSCHSP SET CHARACTER SPACING
GSCHUP SET CHARACTER UP VECTOR
GSCHXP SET CHARACTER EXPANSION FACTOR
GSCLIP SET CLIPPING INDICATOR
GSCR SET COLOUR REPRESENTATION
GSDS SET DEFERRAL STATE
GSDTEC SET DETECTABILITY
GSELNT SELECT NORMALIZATION TRANSFORMATION
GSFACI SET FILL AREA COLOUR INDEX
GSFAI SET FILL AREA INDEX
GSFAIS SET FILL AREA INTERIOR STYLE
GSFAR SET FILL AREA REPRESENTATION
GSFASI SET FILL AREA STYLE INDEX
GSHLIT SET HIGHLIGHTING
GSLCM SET LOCATOR MODE
GSLN SET LINETYPE
GSLWSC SET LINEWIDTH SCALE FACTOR
GSMCH SAMPLE CHOICE
GSMK SET MARKER TYPE
GSMKSC SET MARKER SIZE SCALE FACTOR
GSMLC SAMPLE LOCATOR
GSMPK SAMPLE PICK
GSMSK SAMPLE STROKE
GSMST SAMPLE STRING
GSMVL SAMPLE VALUATOR
GSPA SET PATTERN SIZE
GSPAR SET PATTERN REPRESENTATION
GSPARF SET PATTERN REFERENCE POINT
GSPKID SET PICK IDENTIFIER
GSPKM SET PICK MODE
GSPLCI SET POLYLINE COLOUR INDEX
GSPLI SET POLYLINE INDEX
GSPLR SET POLYLINE REPRESENTATION
GSPMCI SET POLYMARKER COLOUR INDEX
GSPMI SET POLYMARKER INDEX
GSPMR SET POLYMARKER REPRESENTATION
GSSGP SET SEGMENT PRIORITY
GSSGT SET SEGMENT TRANSFORMATION
GSSKM SET STROKE MODE
GSSTM SET STRING MODE
GSTXAL SET TEXT ALIGNMENT
GSTXCI SET TEXT COLOUR INDEX
GSTXFP SET TEXT FONT AND PRECISION
GSTXI SET TEXT INDEX
GSTXP SET TEXT PATH
GSTXR SET TEXT REPRESENTATION
GSVIS SET VISIBILITY
GSVLM SET VALUATOR MODE
GSVP SET VIEWPORT
GSVPIP SET VIEWPORT INPUT PRIORITY
GSWKVP SET WORKSTATION VIEWPORT
GSWKWN SET WORKSTATION WINDOW
GSWN SET WINDOW
GTX TEXT
GUREC UNPACK DATA RECORD (Language Binding)
GUWK UPATE WORKSTATION
GWAIT AWAIT EVENT
GWITM WRITE ITEM TO GKSM
Table 3
Aspect Source 0 BUNDLED 1 INDIVIDUAL
Clear Control Flag 0 CONDITIONALLY 1 ALWAYS
Clipping Indicator 0 NOCLIP 1 CLIP
Coordinate Switch 0 WC 1 NDC
Deferral Mode 0 ASAP 1 BNIG 2 BNIL 3 ASTI
Detectability 0 UNDETECTABLE 1 DETECTABLE
Echo Switch 0 NOECHO 1 ECHO
Fill Area Interior Style 0 HOLLOW 1 SOLID 2 PATTERN 3 HATCH
Highlighting 0 NORMAL 1 HIGHLIGHTED
Implicit Regeneration Mode 0 SUPPRESSED 1 ALLOWED
Input Class 0 NONE 1 LOCATOR 2 STROKE 3 VALUATOR
4 CHOICE 5 PICK 6 STRING
Input Device Status 0 NONE 1 OK 2 NOPICK
NOCHOICE
Operating Mode 0 REQUEST 1 SAMPLE 2 EVENT
Relative Viewport Input Priority 0 HIGHER 1 LOWER
Simultaneous Event Flags 0 NOMORE 1 MORE
Text Alignment Horizontal 0 NORMAL 1 LEFT 2 CENTRE 3 RIGHT
Text Alignment Vertical 0 NORMAL 1 TOP 2 CAP 3 HALF
Text Alignment Vertical 4 BASE 5 BOTTOM
Text Path 0 RIGHT 1 LEFT 2 UP 3 DOWN
Text Precision 0 STRING 1 CHAR 2 STROKE
Type of returned Values 0 SET 1 REALIZED
Update Regeneration Flag 0 POSTPONE 1 PERFORM
Visibility 0 INVISIBLE 1 VISIBLE
Table 4
Aspect Source 0 GBUNDL 1 GINDIV
Clear Control Flag 0 GCONDI 1 GALWAY
Clipping Indicator 0 GNCLIP 1 GCLIP
Coordinate Switch 0 GWC 1 GNDC
Deferral Mode 0 GASAP 1 GBNIG 2 GBNIL 3 GASTI
Detectability 0 GUNDET 1 GDETEC
Echo Switch 0 GNECHO 1 GECHO
Fill Area Interior Style 0 GHOLLO 1 GSOLID 2 GPATTR 3 GHATCH
Highlighting 0 GNORML 1 GHILIT
Implicit Regeneration Mode 0 GSUPPD 1 GALLOW
Input Class 0 GNCLAS 1 GLOCAT 2 GSTROK 3 GVALUA
4 GCHOIC 5 GPICK 6 GSTRIN
Input Device Status 0 GNONE 1 GOK 2 GNPICK
GNOCHOI
Operating Mode 0 GREQUE 1 GSAMPL 2 GEVENT
Relative Viewport Input Priority 0 GHIGHR 1 GLOWER
Simultaneous Event Flags 0 GNMORE 1 GMORE
Text Alignment Horizontal 0 GAHNOR 1 GALEFT 2 GACENT 3 GARITE
Text Alignment Vertical 0 GAVNOR 1 GATOP 2 GACAP 3 GAHALF
Text Alignment Vertical 4 GABASE 5 GABOTT
Text Path 0 GRIGHT 1 GLEFT 2 GUP 3 GDOWN
Text Precision 0 GSTRP 1 GCHARP 2 GSTRKP
Type of returned Values 0 GSET 1 GREALI
Update Regeneration Flag 0 GPOSTP 1 GPERFO
Visibility 0 GINVIS 1 GVISI

CONTROL FUNCTIONS

GOPKS
OPEN GKS
SUBROUTINE GOPKS(ERRFIL, BUFA)
In
INTEGER ERRFIL
error message file
In
INTEGER BUFA
amount of memory units for buffer area

Start working with GKS

GCLKS
CLOSE GKS
SUBROUTINE GCLKS
None

Stop working with GKS

GOPWK
OPEN WORKSTATION
SUBROUTINE GOPWK(WKID, CONID, WTYPE)
In
INTEGER WKID
workstation identifier
In
INTEGER CONID
connection identifier
In
INTEGER WTYPE
workstation type

Create a connection between the specified workstation and GKS

GCLWK
CLOSE WORKSTATION
SUBROUTINE GCLWK(WKID)
In
INTEGER WKID
workstation identifier

Release the connection between the specified workstation and GKS

GACWK
ACTIVATE WORKSTATION
SUBROUTINE GACWK(WKID)
In
INTEGER WKID
workstation identifier

Output is routed to the specified workstation

GDAWK
DEACTIVATE WORKSTATION
SUBROUTINE GDAWK(WKID)
In
INTEGER WKID
workstation identifier

Output is no longer routed to the specified workstation

GCLRWK
CLEAR WORKSTATION
SUBROUTINE GCLRWK(WKID, COFL)
In
INTEGER WKID
workstation identifier
In
INTEGER COFL
control flag

Perform all deferred actions and clear display space on the specified workstation. All segments stored on the workstation are deleted

GRSGWK
REDRAW ALL SEGMENTS ON WORKSTATION
SUBROUTINE GRSGWK(WKID)
In
INTEGER WKID
workstation identifier

Redraw all visible segments stored on the specified workstation

GUWK
UPDATE WORKSTATION
SUBROUTINE GUWK(WKID, REGFL)
In
INTEGER WKID
workstation identifier
In
INTEGER REGFL
update regeneration flag

Perform all deferred actions and redraw all visible segments stored on the specified workstation

GSDS
SET DEFERRAL STATE
SUBROUTINE GSDS(WKID, DEFMOD, REGMOD)
In
INTEGER WKID
workstation identifier
In
INTEGER DEFMOD
deferral mode
In
INTEGER REGMOD
implicit regeneration mode

Set deferral state for the specified workstation

GMSG
MESSAGE
SUBROUTINE GMSG(WKID, MESS)
In
INTEGER WKID
workstation identifier
In
CHARACTER*(*) MESS
message

Send a message to the specified workstation

GESC
ESCAPE
SUBROUTINE GESC(FCTID, LIDF, IDR, MODR, LODR, ODR)
In
INTEGER FCTID
function identification
In
INTEGER LIDR
dimension of escape input data record
In
CHARACTER*80 IDR(LIDR)
escape input data record
In
INTEGER MODR
maximum length of escape output data record
Out
INTEGER LODR
number of array elements occupied in ODR
Out
CHARACTER*80 ODR(MODR)
escape output data record

A standard way of invoking non-standard features

OUTPUT FUNCTIONS

GPL
POLYLINE
SUBROUTINE GPL(N, PX, PY)
In
INTEGER N
number of points
In
REAL PX{N}
X coordinates of points in WC
In
REAL PY{N}
Y coordinates of points in WC

Generate a polyline defined by points in world coordinates

GPM
POLYMARKER
SUBROUTINE GPM(N, PX, PY)
In
INTEGER N
number of points
In
REAL PX{N}
X coordinates of points in WC
In
REAL PY{N}
Y coordinates of points in WC

Generate markers of a given type at specified points in world coordinates

GTX
TEXT
SUBROUTINE GTX(PX, PY, CHARS)
In
INTEGER N
number of points
In
REAL PX
X coordinates of text position in WC
In
REAL PY
Y coordinates of text position in WC
In
CHARACTER*(*) CHARS
string of characters

Generate a text string at the given position in world coordinates

GFA
FILL AREA
SUBROUTINE GFA(N, PX, PY)
In
INTEGER N
number of points
In
REAL PX{N}
X coordinates of points in WC
In
REAL PY{N}
Y coordinates of points in WC

Generate a polygon which may be filled with a colour, a hatch or a pattern, or may be hollow

GCA
CELL ARRAY
SUBROUTINE GCA(PX, PY, QX, QY, DIMX, DIMY, ISC, ISR, DX, DY, CLA)
In
REAL PX
X coordinate of point P in WC
In
REAL PY
Y coordinate of point P in WC
In
REAL QX
X coordinate of point Q in WC
In
REAL QY
Y coordinate of point Q in WC
In
INTEGER DIMX
dimension of CLA in x
In
INTEGER DIMY
dimension of CLA in y
In
INTEGER ISC
index of starting column
In
INTEGER ISR
index of starting row
In
INTEGER DX
number of columns in colour index array
In
INTEGER DY
number of rows in colour index array
In
INTEGER CLA(DIMX, DIMY)
colour index array

Map the given array of colour indices onto the display surface

GGDP
GENERALIZED DRAWING PRIMITIVE
SUBROUTINE GGDP(N, PX, PY, PRIMID, LDR, DR)
In
INTEGER N
number of points
In
REAL PX(*)
X coordinates of point P in WC
In
REAL PY(*)
Y coordinates of point P in WC
In
INTEGER PRIMID
GDP identifier
In
INTEGER LDR
dimension of GDP data record
In
CHARACTER*80 DR(LDR)
GDP data record

Generate a generalized drawing primitive defined by a sequence of points in world coordinates and a data record

OUTPUT ATTRIBUTES

Workstation Independent Primitive Attributes

GSPLI
SET POLYLINE INDEX
SUBROUTINE GSPLI(INDEX)
In
INTEGER INDEX
polyline index

Select a bundle index for polylines

GSLN
SET LINETYPE
SUBROUTINE GSLN(LTYPE)
In
INTEGER LTYPE
linetype

Set the linetype for use when the corresponding ASF is INDIVIDUAL

GSLWSC
SET LINEWIDTH SCALE FACTOR
SUBROUTINE GSLWSC(LWIDTH)
In
REAL LWIDTH
linewidth scale factor

Set the linewidth scale factor for use when the corresponding ASF is INDIVIDUAL

GSPLCI
SET POLYLINE COLOUR INDEX
SUBROUTINE GSPLCI(COLI)
In
INTEGER COLI
polyline colour index

Set the polyline colour index for use when the corresponding ASF is INDIVIDUAL

GSPMI
SET POLYMARKER INDEX
SUBROUTINE GSPMI(INDEX)
In
INTEGER INDEX
polymarker index

Select a bundle index for polymarkers

GSMK
SET MARKER TYPE
SUBROUTINE GSML(MTYPE)
In
INTEGER MTYPE
marker type

Set the marker type for use when the corresponding ASF is INDIVIDUAL

GSMKSC
SET MARKER SIZE SCALE FACTOR
SUBROUTINE GSMKSC(MSZSF)
In
REAL MSZSF
marker size scale factor

Set the marker size scale factor for use when the corresponding ASF is INDIVIDUAL

GSPMCI
SET POLYMARKER COLOUR INDEX
SUBROUTINE GSPMCI(COLI)
In
INTEGER COLI
polymarker colour index

Set the polymarker colour index for use when the corresponding ASF is INDIVIDUAL

GSTXI
SET TEXT INDEX
SUBROUTINE GSTXI(INDEX)
In
INTEGER INDEX
text index

Select a bundle index for text

GSTXFP
SET TEXT FONT AND PRECISION
SUBROUTINE GSTXFP(FONT, PREC)
In
INTEGER FONT
text font
In
INTEGER PREC
text precision

Set the text font and precision for use when the corresponding ASF is INDIVIDUAL

GSCHXP
SET CHARACTER EXPANSION FACTOR
SUBROUTINE GSCHXP(CHXP)
In
REAL CHXP
character expansion factor

Set the character expansion factor as a fraction of the character height for use when the corresponding ASF is INDIVIDUAL

GSCHSP
SET CHARACTER SPACING
SUBROUTINE GSCHSP(CHSP)
In
REAL CHSP
character spacing

Set the character spacing as a fraction of the character height for use when the corresponding ASF is INDIVIDUAL

GSTXCI
SET TEXT COLOUR INDEX
SUBROUTINE GSTXCI(COLI)
In
INTEGER COLI
text colour index

Set the text colour index for use when the corresponding ASF is INDIVIDUAL

GSCHH
SET CHARACTER HEIGHT
SUBROUTINE GSCHH(CHH)
In
REAL CHH
character height in WC

Set the character height in world coordinates

GSCHUP
SET CHARACTER UP VECTOR
SUBROUTINE GSCHUP(CHUX, CHUY)
In
REAL CHUX
X component of character up vector in WC
In
REAL CHUY
Y component of character up vector in WC

Set the character up vector in world coordinates

GSTXP
SET TEXT PATH
SUBROUTINE GSTXP(TXP)
In
INTEGER TXP
text path

Set the text path

GSTXAL
SET TEXT ALIGNMENT
SUBROUTINE GSTXAL(TXALH, TYALH)
In
INTEGER TXALH
text alignemnt horizontal
In
INTEGER TYALH
text alignment vertical

Set the horizontal and vertical alignment of text strings

GSFAI
SET FILL AREA INDEX
SUBROUTINE GSFAI(INDEX)
In
INTEGER INDEX
fill area index

Select a bundle index for fill area

GSFAIS
SET FILL AREA INTERIOR STYLE
SUBROUTINE GSFAIS(INTS)
In
INTEGER INTS
fill area interior style

Set the fill area interior style for use when the corresponding ASF is INDIVIDUAL

GSFASI
SET FILL AREA STYLE INDEX
SUBROUTINE GSFASI(STYLI)
In
INTEGER STYLI
fill area style index

Set the fill area style index for use when the corresponding ASF is INDIVIDUAL

GSFACI
SET FILL AREA COLOUR INDEX
SUBROUTINE GSFACI(COLI)
In
INTEGER COLI
fill area colour index

Set the fill area colour index for use when the corresponding ASF is INDIVIDUAL

GSPA
SET PATTERN SIZE
SUBROUTINE GSPA(SZX, SZY)
In
REAL SZX
pattern size (X) in WC
In
REAL SZY
pattern size (Y) in WC

Set the pattern size in world coordinates for use in the display of fill area primtives with interior style PATTERN

GSPARF
SET PATTERN REFERENCE POINT
SUBROUTINE GSPARF(RFX, RFY)
In
REAL RFX
X coordinate of pattern reference point in WC
In
REAL RFY
Y coordinate of pattern reference point in WC

Set the pattern reference point in world coordinates for use in the display of fill area primitives with interior style PATTERN

GSASF
SET ASPECT SOURCE FLAGS
SUBROUTINE GSASF(LASF)
In
INTEGER LASF(13)
list of aspect source flags

Define whether the value of each non-geometric aspect is obtained from the corresponding individual attribute or from the appropriate bundle on the workstation

GSPKID
SET PICK IDENTIFIER
SUBROUTINE GSPKID(PKID)
In
INTEGER PKID
pick identifier

Set pick identifier

Workstation Attributes (Representations)

GSPLR
SET POLYLINE REPERESENTATION
SUBROUTINE GSPLR(WKID, PLI, LTYPE, LWIDTH, COLI)
In
INTEGER WKID
workstation identifier
In
INTEGER PLI
polyline index
In
INTEGER LTYPE
linetype
In
REAL LWIDTH
linewidth scale factor
In
INTEGER COLI
colour index

Define the representation of polylines on the specified workstation

GSPMR
SET POLYMARKER REPERESENTATION
SUBROUTINE GSPMR(WKID, PMI, MTYPE, MSZSF, COLI)
In
INTEGER WKID
workstation identifier
In
INTEGER PMI
polymarker index
In
INTEGER MTYPE
marker type
In
REAL MSZSF
marker size scale factor
In
INTEGER COLI
colour index

Define the representation of polymarkers on the specified workstation

GSTXR
SET TEXT REPERESENTATION
SUBROUTINE GSTXR(WKID, TXI, FONT, PREC, CHXP, CHSP, COLI)
In
INTEGER WKID
workstation identifier
In
INTEGER TXI
text index
In
INTEGER FONT
text font
In
INTEGER PREC
text precision
In
REAL CHXP
character expansion factor
In
REAL CHSP
character spacing
In
INTEGER COLI
colour index

Define the representation of text on the specified workstation

GSFAR
SET FILL AREA REPERESENTATION
SUBROUTINE GSFAR(WKID, FAI, INTS, STYLI, COLI)
In
INTEGER WKID
workstation identifier
In
INTEGER FAI
fill area index
In
INTEGER INTS
interior style
In
INTEGER STYLI
style index
In
INTEGER COLI
colour index

Define the representation of fill area primitives on the specified workstation

GSPAR
SET PATTERN REPERESENTATION
SUBROUTINE GSPAR(WKID, PAI, DIMX, DIMY, ISC, ISR, DX, DY, CLA)
In
INTEGER WKID
workstation identifier
In
INTEGER PAI
pattern index
In
INTEGER DIMX
dimension of CLA in x
In
INTEGER DIMY
dimension of CLA in y
In
INTEGER ISC
index of start column
In
INTEGER ISR
index of start row
In
INTEGER DX
number of columns in pattern array
In
INTEGER DY
number of rows in pattern array
In
INTEGER CLA(DIMX, DIMY)
pattern array

Define the pattern to be associated with a pattern index (i.e. a fill area style index) on the specified workstation

GSCR
SET COLOUR REPERESENTATION
SUBROUTINE GSCR(WKID, CI, CR, CG, CB)
In
INTEGER WKID
workstation identifier
In
INTEGER CI
colour index
In
REAL CR
red intensity
In
REAL CG
green intensity
In
REAL CB
blue intensity

Define the colour to be associated with a colour index on the specified workstation

TRANSFORMATION FUNCTIONS

Normalization Transformation

GSWN
SET WINDOW
SUBROUTINE GSWN(TNR, XMIN, XMAX, YMIN, YMAX)
In
INTEGER TNR
transformation number
In
REAL XMIN
window limits in WC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX

Set the window in world coordinates of the specified normalization transformation

GSVP
SET VIEWPORT
SUBROUTINE GSVP(TNR, XMIN, XMAX, YMIN, YMAX)
In
INTEGER TNR
transformation number
In
REAL XMIN
viewport limits in WC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX

Set the viewport in normalized device coordinates of the specified normalization transformation

GSVPIP
SET VIEWPORT INPUT PRIORITY
SUBROUTINE GSVPIP(TNR, RTNR, RELPRI)
In
INTEGER TNR
transformation number
In
INTEGER RTNR
reference transformation number
In
INTEGER RELPRI
relative priority

Set the input priority of the specified viewport for locator and stroke input

GSELNT
SELECT NORMALIZATION TRANSFORMATION
SUBROUTINE GSELNT(TNR)
In
INTEGER TNR
transformation number

Select a normalization transformation for output

GSCLIP
SET CLIPPING INDICATOR
SUBROUTINE GSCLIP(CLSW)
In
INTEGER CLSW
clipping indicator

Set the clipping indicator for the current normalization transformation

Workstation Transformation

GSWKWN
SET WORKSTATION WINDOW
SUBROUTINE GSWKWN(WKID, XMIN, XMAX, YMIN, YMAX)
In
INTEGER WKID
workstation identifier
In
REAL XMIN
workstation window limits in NDC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX

Set the workstation window in normalized device coordinates

GSWKVP
SET WORKSTATION VIEWPORT
SUBROUTINE GSWKVP(WKID, XMIN, XMAX, YMIN, YMAX)
In
INTEGER WKID
workstation identifier
In
REAL XMIN
workstation viewport limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX

Set the workstation viewport in device coordinates

SEGMENT FUNCTIONS

Segment Manipulation Functions

GCRSG
CREATE SEGMENT
SUBROUTINE GCRSG(SGNA)
In
INTEGER SGNA
segment name

The specified segment is created and becomes the open segment

GCLSG
CLOSE SEGMENT
SUBROUTINE GCLSG
None

Close the open segment

GRENSG
RENAME SEGMENT
SUBROUTINE GRENSG(OLD, NEW)
In
INTEGER OLD
old segment name
In
INTEGER NEW
new segment name

Change the name of the specified segment

GDSG
DELETE SEGMENT
SUBROUTINE GDSG(SGNA)
In
INTEGER SGNA
segment name

Delete the specified segment

GDSGWK
DELETE SEGMENT FROM WORKSTATION
SUBROUTINE GDSGWK(WKID, SGNA)
In
INTEGER WKID
workstation identifier
In
INTEGER SGNA
segment name

Delete the specified segment from the specified workstation

GASGWK
ASSOCIATE SEGMENT WITH WORKSTATION
SUBROUTINE GASGWK(WKID, SGNA)
In
INTEGER WKID
workstation identifier
In
INTEGER SGNA
segment name

Associate the specified segment, present in workstation independent segment storage, with the specified open workstation

GCSGWK
COPY SEGMENT TO WORKSTATION
SUBROUTINE GCSGWK(WKID, SGNA)
In
INTEGER WKID
workstation identifier
In
INTEGER SGNA
segment name

Copy the primitives of the specified segment, present in workstation independent segment storage, to the specified workstation

GINSG
INSERT SEGMENT
SUBROUTINE GINSG(SGNA, M)
In
INTEGER SGNA
segment name
In
REAL M(2,3)
transformation matrix

Insert the specified segment, present in workstation independent segment storage, (after the segment transformation and the insert transformation have been applied) into the open segment or the stream of primitives outside segments

Segment Attributes

GSSGT
SET SEGMENT TRANSFORMATION
SUBROUTINE GSSGT(SGNA, M)
In
INTEGER SGNA
segment name
In
REAL M(2,3)
transformation matrix

Set the segment transformation attribute for the specified segment

GSVIS
SET VISIBILITY
SUBROUTINE GSVIS(SGNA, VIS)
In
INTEGER SGNA
segment name
In
INTEGER VIS
visibility

Set the visibility attribute for the specified segment

GSHIL
SET HIGHLIGHTING
SUBROUTINE GSHIL(SGNA, HIL)
In
INTEGER SGNA
segment name
In
INTEGER HIL
highlighting

Set the highlighting attribute for the specified segment

GSSGP
SET SEGMENT PRIORITY
SUBROUTINE GSSGP(SGNA, PRIOR)
In
INTEGER SGNA
segment name
In
INTEGER PRIOR
segment priority

Set the segment priority attribute for the specified segment

GSDTEC
SET DETECTABILITY
SUBROUTINE GSDTEC(SGNA, DET)
In
INTEGER SGNA
segment name
In
INTEGER DET
detectability

Set the segment detectability attribute for the specified segment

INPUT FUNCTIONS

Initialisation of Input Devices

GINLC
INITIALISE LOCATOR
SUBROUTINE GINLC(WKID, LCDNR, TNR, IPX, IPY, PET, XMIN, XMAX, YMIN, YMAX, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER LCDNR
locator device number
In
INTEGER TNR
initial normalization transformation number
In
REAL IPX
X coordinate of initial locator position in WC
In
REAL IPY
Y coordinate of initial locator position in WC
In
INTEGER PET
prompt and echo type
In
REAL XMIN
echo area limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX
In
INTEGER LDR
length of locator data record
In
CHARACTER*80 DR(LDR)
locator data record

Initialise the specified locator device

GINSK
INITIALISE STROKE
SUBROUTINE GINSK(WKID, SKDNR, TNR, N, IPX, IPY, PET, XMIN, XMAX, YMIN, YMAX, BUFLEN, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER SKDNR
stroke device number
In
INTEGER TNR
initial normalization transformation number
In
INTEGER N
number of points in initial stroke (may be ≥0)
In
REAL IPX(*)
X coordinates of points in initial stroke
In
REAL IPY(*)
Y coordinate of points in initial stroke
In
INTEGER PET
prompt and echo type
In
REAL XMIN
echo area limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX
In
INTEGER BUFLEN
buffer length for stroke
In
INTEGER LDR
length of stroke data record
In
CHARACTER*80 DR(LDR)
stroke data record

Initialise the specified stroke device

GINVL
INITIALISE VALUATOR
SUBROUTINE GINVL(WKID, VLDNR, IVAL, PET, XMIN, XMAX, YMIN, YMAX, LOVAL, HIVAL, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER VLDNR
valuator device number
In
INTEGER IVAL
initial value
In
INTEGER PET
prompt and echo type
In
REAL XMIN
echo area limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX
In
REAL LOVAL
low limit of valuator range
In
REAL HIVAL
high limit of valuator range
In
INTEGER LDR
length of valuator data record
In
CHARACTER*80 DR(LDR)
valuator data record

Initialise the specified valuator device

GINCH
INITIALISE CHOICE
SUBROUTINE GINCH(WKID, CHDNR, ISTAT, ICH, PET, XMIN, XMAX, YMIN, YMAX, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER CHDNR
choice device number
In
INTEGER ISTAT
initial status
In
INTEGER ICH
initial choice number
In
INTEGER PET
prompt and echo type
In
REAL XMIN
echo area limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX
In
INTEGER LDR
length of choice data record
In
CHARACTER*80 DR(LDR)
choice data record

Initialise the specified choice device

GINPK
INITIALISE PICK
SUBROUTINE GINPK(WKID, PKDNR, ISTAT, ISGNA, IPKID, PET, XMIN, XMAX, YMIN, YMAX, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER PKDNR
pick device number
In
INTEGER ISTAT
initial status
In
INTEGER ISGNA
initial segment name
In
INTEGER IPKID
initial pick identifier
In
INTEGER PET
prompt and echo type
In
REAL XMIN
echo area limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX
In
INTEGER LDR
length of pick data record
In
CHARACTER*80 DR(LDR)
pick data record

Initialise the specified pick device

GINST
INITIALISE STRING
SUBROUTINE GINST(WKID, STDNR, LSTR, ISTR, PET, XMIN, XMAX, YMIN, YMAX, BUFLEN, INIPOS, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER STDNR
stroke device number
In
INTEGER LSTR
length of initial string (must be ≥0)
In
INTEGER PET
prompt and echo type
In
REAL XMIN
echo area limits in DC
In
REAL XMAX
XMIN < XMAX
In
REAL YMIN
YMIN < YMAX
In
REAL YMAX
In
INTEGER BUFLEN
buffer length of string
In
INTEGER INIPOS
initial cursor position
In
INTEGER LDR
length of string data record
In
CHARACTER*80 DR(LDR)
string data record

Initialise the specified string device

Setting Mode of Input Devices

GSLCM
SET LOCATOR MODE
SUBROUTINE GSLCM(WKID, IDNR, MODE, ESW)
In
INTEGER WKID
workstation identifier
In
INTEGER IDNR
locator device number
In
INTEGER MODE
operating mode
In
INTEGER ESW
echo switch

Set operating mode of the specified locator device

GSSKM
SET STROKE MODE
SUBROUTINE GSSKM(WKID, IDNR, MODE, ESW)
In
INTEGER WKID
workstation identifier
In
INTEGER IDNR
stroke device number
In
INTEGER MODE
operating mode
In
INTEGER ESW
echo switch

Set operating mode of the specified stroke device

GSVLM
SET VALUATOR MODE
SUBROUTINE GSVLM(WKID, IDNR, MODE, ESW)
In
INTEGER WKID
workstation identifier
In
INTEGER IDNR
valuator device number
In
INTEGER MODE
operating mode
In
INTEGER ESW
echo switch

Set operating mode of the specified valuator device

GSCHM
SET CHOICE MODE
SUBROUTINE GSCHM(WKID, IDNR, MODE, ESW)
In
INTEGER WKID
workstation identifier
In
INTEGER IDNR
choice device number
In
INTEGER MODE
operating mode
In
INTEGER ESW
echo switch

Set operating mode of the specified choice device

GSPKM
SET PICK MODE
SUBROUTINE GSPKM(WKID, IDNR, MODE, ESW)
In
INTEGER WKID
workstation identifier
In
INTEGER IDNR
pick device number
In
INTEGER MODE
operating mode
In
INTEGER ESW
echo switch

Set operating mode of the specified pick device

GSSTM
SET STRING MODE
SUBROUTINE GSSTM(WKID, IDNR, MODE, ESW)
In
INTEGER WKID
workstation identifier
In
INTEGER IDNR
string device number
In
INTEGER MODE
operating mode
In
INTEGER ESW
echo switch

Set operating mode of the specified string device

Request Input Functions

GRQLC
REQUEST LOCATOR
SUBROUTINE GRQLC(WKID, LCDNR, STAT, TNR, PX, PY)
In
INTEGER WKID
workstation identifier
In
INTEGER LCDNR
locator device number
Out
INTEGER STAT
status
Out
INTEGER TNR
normalization transformation number
Out
REAL PX
X coordinate of locator position in WC
Out
REAL PY
Y coordinate of locator position in WC

Request position in world coordinates and normalization transformation number from the specified locator device

GRQSK
REQUEST STROKE
SUBROUTINE GRQSK(WKID, SKDNR, N, STAT, TNR, NP, PX, PY)
In
INTEGER WKID
workstation identifier
In
INTEGER SKDNR
stroke device number
In
INTEGER N
maximum number of points
Out
INTEGER STAT
status
Out
INTEGER TNR
normalization transformation number
Out
INTEGER NP
number of points
Out
REAL PX(N)
X coordinates of points in stroke in WC
Out
REAL PY(N)
Y coordinate of points in stroke in WC

Request sequence of points in world coordinates and normalization transformation number from the specified stroke device

GRQVL
REQUEST VALUATOR
SUBROUTINE GRQVL(WKID, VLDNR, STAT, VAL)
In
INTEGER WKID
workstation identifier
In
INTEGER VLDNR
valuator device number
Out
INTEGER STAT
status
Out
REAL VAL
value

Request real value from the specified valuator device

GRQCH
REQUEST CHOICE
SUBROUTINE GRQCH(WKID, CHDNR, STAT, CHNR)
In
INTEGER WKID
workstation identifier
In
INTEGER CHDNR
choice device number
Out
INTEGER STAT
status
Out
INTEGER CHNR
choice number

Request non-negative integer, representing a selection from a number of choices, and choice status from the specified choice device

GRQPK
REQUEST PICK
SUBROUTINE GRQPK(WKID, PKDNR, STAT, SGNA, PKID)
In
INTEGER WKID
workstation identifier
In
INTEGER PKDNR
pick device number
Out
INTEGER STAT
status
Out
INTEGER SGNA
segment name
Out
INTEGER PKID
pick identifier

Request segment name, pick identifier and pick status from the specified pick device

GRQST
REQUEST STRING
SUBROUTINE GRQST(WKID, STDNR, STAT, LSTR, STR)
In
INTEGER WKID
workstation identifier
In
INTEGER STDNR
string device number
Out
INTEGER STAT
status
Out
INTEGER LSTR
length of string (in characters)
Out
CHARACTER*(*) STR
character string

Request character string from the specified string device

Sample Input Functions

GSMLC
SAMPLE LOCATOR
SUBROUTINE GSMLC(WKID, LCDNR, TNR, PX, PY)
In
INTEGER WKID
workstation identifier
In
INTEGER LCDNR
locator device number
Out
INTEGER TNR
normalization transformation number
Out
REAL PX
X coordinate of locator position in WC
Out
REAL PY
Y coordinate of locator position in WC

Sample the specified locator device, delivering a point in world coordinates and a normalization transformation number

GSMSK
SAMPLE STROKE
SUBROUTINE GSMSK(WKID, SKDNR, N, TNR, NP, PX, PY)
In
INTEGER WKID
workstation identifier
In
INTEGER SKDNR
stroke device number
In
INTEGER N
maximum number of points
Out
INTEGER TNR
normalization transformation number
Out
INTEGER NP
number of points
Out
REAL PX(N)
X coordinates of points in stroke in WC
Out
REAL PY(N)
Y coordinate of points in stroke in WC

Sample the specified stroke device, delivering a sequence of points III world coordinates and a normalization transformation number

GSMVL
SAMPLE VALUATOR
SUBROUTINE GSMVL(WKID, VLDNR, VAL)
In
INTEGER WKID
workstation identifier
In
INTEGER VLDNR
valuator device number
Out
REAL VAL
value

Sample the specified valuator device, delivering a real value

GSMCH
SAMPLE CHOICE
SUBROUTINE GSMCH(WKID, CHDNR, STAT, CHNR)
In
INTEGER WKID
workstation identifier
In
INTEGER CHDNR
choice device number
Out
INTEGER STAT
status
Out
INTEGER CHNR
choice number

Sample the specified choice device, delivering a non-negative integer, which represents a selection from a number of choices, and choice status

GSMPK
SAMPLE PICK
SUBROUTINE GSMPK(WKID, PKDNR, STAT, SGNA, PKID)
In
INTEGER WKID
workstation identifier
In
INTEGER PKDNR
pick device number
Out
INTEGER STAT
status
Out
INTEGER SGNA
segment name
Out
INTEGER PKID
pick identifier

Sample the specified pick device, delivering a segment name, pick identifier and pick status

GSMST
SAMPLE STRING
SUBROUTINE GSMST(WKID, STDNR, LSTR, STR)
In
INTEGER WKID
workstation identifier
In
INTEGER STDNR
string device number
Out
INTEGER LSTR
length of string (in characters)
Out
CHARACTER*(*) STR
character string

Sample the specified string device, delivering a character string

Event Input Functions

GWAIT
AWAIT EVENT
SUBROUTINE GWAIT(TOUT, WKID, ICL, IDNR)
In
REAL TOUT
timeout in seconds
Out
INTEGER WKID
workstation identifier
Out
INTEGER ICL
input class
Out
INTEGER IDNR
logical input device number

If the input queue is empty, wait for an input item until the specified time has elapsed. Read the workstation identifier, input class, and logical input device number of the oldest entry in the input queue and make the values available for subsequent interrogation by the GET functions.

GFLUSH
FLUSH DEVICE EVENTS
SUBROUTINE GFLUSH(WKID, ICL, IDNR)
In
INTEGER WKID
workstation identifier
In
INTEGER ICL
input class
In
INTEGER IDNR
logical input device number

Delete all the events from the specified logical input device in the input queue

GGTLC
GET LOCATOR
SUBROUTINE GGTLC(TNR, PX, PY)
Out
INTEGER TNR
normalization transformation number
Out
REAL PX
X coordinate of locator position in WC
Out
REAL PY
Y coordinate of locator position in WC

Transfer position in world coordinates and normalization transformation number from the current event report to the application program

GGTSK
GET STROKE
SUBROUTINE GGTSK(N, TNR, NP, PX, PY)
In
INTEGER N
maximum number of points
Out
INTEGER TNR
normalization transformation number
Out
INTEGER NP
number of points
Out
REAL PX(N)
X coordinates of points in stroke in WC
Out
REAL PY(N)
Y coordinate of points in stroke in WC

Transfer sequence of points in world coordinates and normalization transformation number from the current event report to the application program

GGTVL
GET VALUATOR
SUBROUTINE GGTVL(VAL)
Out
REAL VAL
value

Transfer real value from the current event report to the application program

GGTCH
GET CHOICE
SUBROUTINE GGTCH(STAT, CHNR)
Out
INTEGER STAT
status
Out
INTEGER CHNR
choice number

Transfer non-negative integer, representing a selection from a number of choices, and choice status from the current event report to the application program

GGTPK
GET PICK
SUBROUTINE GGTPK(STAT, SGNA, PKID)
Out
INTEGER STAT
status
Out
INTEGER SGNA
segment name
Out
INTEGER PKID
pick identifier

Transfer segment name, pick identifier and pick status from the current event report to the application program

GGTST
GET STRING
SUBROUTINE GGTST(LSTR, STR)
Out
INTEGER LSTR
length of string (in characters)
Out
CHARACTER*(*) STR
character string

Transfer character string from the current event report to the application program

METAFILE FUNCTIONS

GWITM
WRITE ITEM TO GKSM
SUBROUTINE GWITM(WKID, TYPE, IDRL, LDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER TYPE
item type
In
INTEGER IDRL
item data record length
In
INTEGER LDR
dimension of data record array
In
CHARACTER*80 DR(LDR)
data record array

Pass non-graphical data from the application program to the GKS metafile

GGTITM
GET ITEM TYPE FROM GKSM
SUBROUTINE GGTITM(WKID, TYPE, IDRL)
In
INTEGER WKID
workstation identifier
Out
INTEGER TYPE
item type
Out
INTEGER IDRL
item data record length

Pass the item type and item data record length of the current item back to the application program

GRDITM
READ ITEM FROM GKSM
SUBROUTINE GRDITM(WKID, MIDRL, MLDR, DR)
In
INTEGER WKID
workstation identifier
In
INTEGER MIDRL
maximum item data record length
In
INTEGER MLDR
dimension of data record array
Out
CHARACTER*80 DR(MLDR)
data record array

Pass the current item to the application program (graphical or nongraphical item)

GIITM
INTERPRET ITEM
SUBROUTINE GIITM(TYPE, IDRL, LDR, DR)
In
INTEGER TYPE
item type
In
INTEGER IDRL
item data record length
In
INTEGER LDR
dimension of data record array
Out
CHARACTER*80 DR(LDR)
data record array

Interpret the item read in by READ ITEM FROM GKSM. The interpretation causes appropriate changes in the set of GKS state variables and generates appropriate graphical output as determined by the metafile specification

UTILITY FUNCTIONS

Functions Defined in GKS

GEVTM
EVALUATE TRANSFORMATION MATRIX
SUBROUTINE GEVTM(XO, YO, DX, DY, PHOI, FX, FY)
In
REAL XO
X coordinate of fixed point in WC or NDC
In
REAL YO
Y coordinate of fixed point in WC or NDC
In
REAL DX
X component of shift vector in WC or NDC
In
REAL DY
Y component of shift vector in WC or NDC
In
REAL PHI
rotation angle in radians
In
REAL FX
X scale factor
In
REAL FY
Y scale factor
In
INTEGER SW
coordinate switch specifying WC or NDC
Out
REAL MOUT(2,3)
output transformation matrix

The transformation specified by fixed point, shift vector, rotation angle and scale factors is evaluated and the result is returned in the output transformation matrix

GACTM
ACCUMULATE TRANSFORMATION MATRIX
SUBROUTINE GACTM(MIN, XO, YO, DX, DY, PHOI, FX, FY)
In
REAL MIN(2,3)
input transformation matrix
In
REAL XO
X coordinate of fixed point in WC or NDC
In
REAL YO
Y coordinate of fixed point in WC or NDC
In
REAL DX
X component of shift vector in WC or NDC
In
REAL DY
Y component of shift vector in WC or NDC
In
REAL PHI
rotation angle in radians
In
REAL FX
X scale factor
In
REAL FY
Y scale factor
In
INTEGER SW
coordinate switch specifying WC or NDC
Out
REAL MOUT(2,3)
output transformation matrix

The transformation specified by fixed point, shift vector, rotation angle and scale factors is combined with the input transformation matrix and the result is returned in the output transformation matrix

Functions Defined in this Language Binding

GPREC
PACK DATA RECORD
SUBROUTINE GPREC(IL, IA, RL, RA, NS, LSA, CA, IDIL, ERRIND, IDOL, DR)
In
INTEGER IL
length of integer array
In
INTEGER IA(*)
integer array
In
INTEGER RL
length of real array
In
REAL RA(*)
real array
In
INTEGER NS
number of strings
In
INTEGER LSA(*)
length of each string (in characters)
In
CHARACTER*(*) CA(*)
array of strings
In
INTEGER IDIL
maximum length of data record
Out
INTEGER ERRIND
error indicator
Out
INTEGER IDOL
length of data record
Out
CHARACTER*80 DR(IDIL)
data record

Pack a data record into a CHARACTER*80 array

GUREC
UNPACK DATA RECORD
SUBROUTINE GUREC(IDL, DR, IIL, IRL, ISL, ERRIND, IL, IA, RL, RA, NS, LSA, CA)
In
INTEGER IDL
length of data record
In
CHARACTER*80 DR(IDL)
data record
In
INTEGER IIL
maximum length of integer array
In
INTEGER IRL
maximum length of real array
In
INTEGER ISL
maximum length of string array
Out
INTEGER ERRIND
error indicator
Out
INTEGER IL
number of integers
Out
INTEGER IA(IIL)
integer array
Out
INTEGER RL
number of reals
Out
REAL RA(IRL)
real array
Out
INTEGER NS
number of strings
Out
INTEGER LSA(ISL)
length of each string (in characters)
In
CHARACTER*(*) CA(ISL)
array of strings

Unpack a data record from a CHARACTER*80 array

ERROR HANDLING

GECLKS
EMERGENCY CLOSE GKS
SUBROUTINE GECLKS
None

Tries to close GKS in case of an error, saving as much information as possible

GERHND
ERROR HANDLING
SUBROUTINE GERHND(ERRNR, FCTID, ERRFIL)
In
INTEGER ERRNR
error number
In
INTEGER FCTID
function identifier
In
INTEGER ERRFIL
error file

A procedure called by GKS when an error is detected. It may be user supplied

GERLOG
ERROR LOGGING
SUBROUTINE GERLOG(ERRNR, FCTID, ERRFIL)
In
INTEGER ERRNR
error number
In
INTEGER FCTID
function identifier
In
INTEGER ERRFIL
error file

A procedure called by the standard GKS error handling procedure. It prints an error message and function identification on the error file

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site