When you use GASK routines, remember the following:
All arguments are required.
Most arguments are expressed as variable names . You can use any valid SAS variable name .
If character arguments are expressed as character strings, they must be enclosed in quotation marks.
All character variable names used as arguments must be declared in a previous LENGTH statement.
GASK routines do not change the operating state.
PUT statements display a value returned by a routine in the SAS log.
OUTPUT statements write a value that is returned by a routine to a data set.
GASK routines enable you to check these current attribute settings:
ASF
ASPECT
CATALOG
CBACK
CLIP
COLINDEX
COLREP
DEVICE
FILCOLOR
FILINDEX
FILREP
FILSTYLE
FILTYPE
GRAPHLIST
HPOS
HSIZE
HTML
LINCOLOR
LININDEX
LINREP
LINTYPE
LINWIDTH
MARCOLOR
MARINDEX
MARREP
MARSIZE
MARTYPE
MAXDISP
NUMGRAPH
OPENGRAPH
PATREP
STATE
TEXALIGN
TEXCOLOR
TEXEXTENT
TEXFONT
TEXHEIGHT
TEXINDEX
TEXPATH
TEXREP
TEXUP
TRANS
TRANSNO
VIEWPORT
VPOS
VSIZE
WINDOW
WSACTIVE
WSOPEN
Finds whether an aspect source flag is bundled or separate
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( ASF , attribute, status, return-code-variable );
The GASK( ASF , ) routine returns the aspect source flag (ASF) of a particular attribute. Possible ASF values are BUNDLED (associated with a bundle index) and INDIVIDUAL (separate from a bundle index). GASK( ASF , ) returns the default value INDIVIDUAL if you have not set the ASF for an attribute.
attribute | character string enclosed in quotes or character variable name with one of the following values:
|
status | character variable name; returns either the value BUNDLED or INDIVIDUAL. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
ASF on page 1463
FILCOLOR on page 1469
FILSTYLE on page 1471
FILTYPE on page 1473
LINCOLOR on page 1476
LINTYPE on page 1479
LINWIDTH on page 1479
MARCOLOR on page 1480
MARSIZE on page 1483
MARTYPE on page 1483
TEXCOLOR on page 1488
TEXFONT on page 1489
Finds the aspect ratio
Operating States: All
Return Codes:
CALL GASK( ASPECT , aspect, return-code-variable );
The GASK( ASPECT , ) routine returns the current aspect ratio used to draw graphics output. GASK( ASPECT , ) searches for the current aspect ratio in the following order:
the aspect ratio set with the GSET( ASPECT , ) function
the ASPECT= graphics option
the device s default aspect ratio found in the device entry. For more information on device entries, see Chapter 31, The GDEVICE Procedure, on page 915.
aspect | numeric variable name; returns the aspect ratio. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
ASPECT= graphics option (see ASPECT on page 262)
ASPECT on page 1465
Finds the catalog for the graphs
Operating States: All
Return Codes:
CALL GASK( CATALOG , libref, memname, return-code-variable );
The GASK( CATALOG , ) routine returns the libref and the name of the current output catalog. GASK( CATALOG , ) returns the default catalog, WORK.GSEG, if no other catalog has been specified with the GSET( CATALOG , ) function.
libref | character variable name; returns the libref of the library in which the current catalog is stored. |
memname | character variable name; returns the name of the current output catalog. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
CATALOG on page 1465
NUMGRAPH on page 1427
OPENGRAPH on page 1428
Finds the background color
Operating States: All
Return Codes:
CALL GASK( CBACK , cback, return-code-variable );
The GASK( CBACK , )routine returns the current background color. GASK( CBACK , )searches for the current background color in the following order:
the background color selected with the GSET( CBACK , )function
the CBACK= graphics option
the default background color for the device found in the device entry. For more information about device entries, see Chapter 31, The GDEVICE Procedure, on page 915.
cback | character variable name; returns the background color name. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
CBACK= graphics option (see CBACK on page 266)
CBACK on page 1466
Finds whether clipping is on or off
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 55, 56
CALL GASK( CLIP , status );
The GASK( CLIP , )routine checks whether clipping outside of viewports is enabled or disabled. One of the two following messages is displayed when this routine is called:
NOTE: Clipping is ON.
or
NOTE: Clipping is OFF.
Clipping is OFF by default.
status | numeric variable name; returns the current setting, 55 (ON) or 56 (OFF), for clipping. |
CLIP on page 1467
Finds the color indexes that have colors associated with them
Operating States: SGOP
Return Codes: 0, 4, 86, 87
CALL GASK( COLINDEX , n, index-array, return-code-variable );
The GASK( COLINDEX , )routine returns the color indexes that currently have colors assigned to them.
n | numeric constant or numeric variable name; tells how many color indexes you want returned. If n is expressed as a variable, the variable must be initialized . The variable returns the number of colors currently assigned. If n is expressed as a constant, it will not return this value. |
index-array | list of numeric variables into which the used color index numbers are returned. The list of variable names can be members of an array or OF argument lists (where the arguments are variables). If you are using an array, index-array must have been declared as an array. The dimension of the array is determined by the number of color indexes you want returned. Refer to the discussion of ARRAY in SAS Language Reference: Dictionary for more information about OF argument lists. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLREP on page 1410
COLREP on page 1467
Finds the color name associated with a color index
Operating States: SGOP
Return Codes: 0, 4, 86, 87
CALL GASK( COLREP , color-index, color, return-code-variable );
The GASK( COLREP , )routine returns the predefined SAS color name associated with a color index. GASK( COLREP , )searches for the current color assigned to a color index in the following order:
the color selected by the GSET( COLREP , ) function.
the COLORS= graphics option. If color-index is 2, the routine returns the second color from the colors list of the COLORS= graphics option.
the device s default colors list found in the device entry. If color-index is 2, the routine returns the second color from the default colors list.
See SAS Color Names and RGB Values on page 99 for a list of SAS predefined color names.
color-index | numeric constant; indicates the color index for which you want to check the color. Valid values are 1 to 256, inclusive. |
color | character variable name; returns the color name associated with color-index . |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLINDEX on page 1409
COLREP on page 1467
Finds the output graphics device
Operating States: All
Return Codes:
CALL GASK( DEVICE , device, return-code-variable );
The GASK( DEVICE , )routine returns the current device driver. This routine returns the device driver set by one of the following methods :
the GSET( DEVICE , )function
the DEVICE= graphics option
the device driver you entered in the DEVICE prompt window
the device driver you entered in the OPTIONS window.
There is no default value for a device driver. To use DSGI, you must specify a device driver. For more information about setting device drivers, see Selecting a Device Driver on page 43.
device | character variable name; returns the name of the device driver. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
DEVICE= graphics option (see DEVICE on page 279)
DEVICE on page 1468
Finds the color index of the color to be used to draw fill areas
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( FILCOLOR , color-index, return-code-variable );
The GASK( FILCOLOR , )routine returns the current fill color. If a GSET( FILCOLOR , )function has not been previously submitted, GASK( FILCOLOR , )returns the default value, 1. The color index returned corresponds to a color specification in the following order:
the color assigned to a color name with the GSET( COLREP , )function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list found in the device entry.
color-index | numeric variable name; returns the color index of the fill color currently selected. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
COLREP on page 1467
FILCOLOR on page 1469
Finds the bundle of fill area attributes that is active
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( FILINDEX , index, return-code-variable );
The GASK( FILINDEX , )routine asks which fill bundle is active. If no fill bundles have been previously defined with GSET( FILREP , )or activated with GSET( FILINDEX , ), GASK( FILINDEX , )returns the default value, 1.
index | numeric variable name; returns the index of the fill bundle currently selected. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
FILREP on page 1413
FILREP on page 1470
FILINDEX on page 1470
Finds the fill area attributes associated with a bundle index
Operating States: GKOP, WSOP, WSAC, SGOP
Return Codes: 0, 8, 75, 76
CALL GASK ( FILREP , index, color-index, interior, style-index, return-code-variable );
The GASK( FILREP , )routine returns the color, type of interior, and fill pattern associated with a specific fill bundle. If the bundle indicated by index has not been previously defined with the GSET( FILREP , )function, DSGI issues the following error message:
ERROR: A representation for the specified fill area index has not been defined on this workstation.
index | numeric constant or numeric variable name; indicates the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20. |
color-index | numeric variable name; returns the color index of the fill color associated with the bundle. The color index that is returned corresponds to a color specification in the following order:
|
interior | character variable name; returns the style of the interior associated with the bundle index “ that is, one of the following values:
|
style-index | numeric variable name; returns the index of the fill pattern associated with the bundle. See the FILSTYLE on page 1471 for the fill patterns represented by style-index . |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
FILINDEX on page 1413
COLREP on page 1467
FILREP on page 1470
FILSTYLE on page 1471
Finds the style of the fill area when FILTYPE is PATTERN or HATCH
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( FILSTYLE , style-index, return-code-variable );
The GASK( FILSTYLE , )routine returns the current fill style of the interior when FILTYPE is PATTERN or HATCH. If no fill style has been previously selected with the GSET( FILSTYLE , )function, GASK( FILSTYLE , )returns the default value, 1.
style-index | numeric variable name; returns the index of the fill pattern associated with the bundle. See the FILSTYLE on page 1471 for the interior styles represented by style-index . |
return-code-variable | numeric variable name; returns the return code of the routine call. |
FILTYPE on page 1415
FILSTYLE on page 1471
FILTYPE on page 1473
Finds the type of the interior of the fill area
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( FILTYPE , interior, return-code-variable );
The GASK( FILTYPE , )routine returns the current fill type. If no fill type has been previously selected with the GSET( FILTYPE , )function, GASK( FILTYPE , )returns the default value, HOLLOW.
interior | character variable name; returns the fill type that is active, that is, one of the following values:
|
return-code-variable | numeric variable name; returns the return code of the routine call. |
FILSTYLE on page 1414
FILTYPE on page 1415
Finds the names of segments in the current catalog
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( GRAPHLIST , n, name-array, return-code-variable );
The GASK( GRAPHLIST , )routine lists the first n names of the graphs that are in the current catalog. If a catalog has not been previously specified with the GRAPH( CATALOG , )function, the routine returns names from the default catalog, WORK.GSEG.
The names returned are any of the following:
those specified in the GRAPH( CLEAR , )function
if the name is omitted from the GRAPH( CLEAR )function, some form of DSGI: for example, DSGI, DSGI1, or DSGI2.
the name specified in the NAME= option of a graphics procedure
graphs previously created by other graphics procedures and already in the catalog.
n | numeric variable name; tells the maximum number of graph names you want returned. If you express n as a variable, the variable must be initialized to the maximum number of graph names you want returned. |
name-array | list of character variable names into which the graph names will be returned. The list of variable names can be members of an array or OF argument lists (where the arguments are variables). If you are using an array, name-array must be declared as an array. The dimension of the array is determined by the number of color indexes you want returned. See the discussion for ARRAY in SAS Language Reference: Dictionary for more information about OF argument lists. |
return-code-variable | numeric variable names; returns the return code of the routine call. |
CLEAR on page 1457
Finds the number of columns
Operating States: All
Return Codes:
CALL GASK( HPOS , hpos, return-code-variable );
The GASK( HPOS , )routine returns the number of columns currently in the graphics output area. GASK( HPOS , )searches for the current number of columns in the following order:
the value selected in the GSET( HPOS , )function
the value of the HPOS= graphics option
the device s default HPOS value found in the device entry.
hpos | numeric variable name; returns the number of columns in the graphics output area. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
HSIZE on page 1418
HPOS on page 1474
HPOS= graphics option (see HPOS on page 315)
Finds the horizontal dimension of the graphics output area
Operating States: All
Return Codes:
CALL GASK( HSIZE , hsize, return-code-variable );
The GASK( HSIZE , )routine returns the current horizontal dimension, in inches, of the graphics output area. GASK( HSIZE , )searches for the current horizontal dimension in the following order:
the value selected in the GSET( HSIZE , )function
the value of the HSIZE= graphics option
the device s default HSIZE found in the device entry.
hsize | numeric variable name; the size of the graphics output area in the x dimension (in inches). |
return-code-variable | numeric variable name; returns the return code of the routine call. |
HPOS on page 1417
HSIZE on page 1475
HSIZE= graphics option (see HSIZE on page 315)
Finds the HTML string that is in effect when one of the following graphic elements is drawn: bar, ellipse, fill, mark, pie, and text.
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( HTML , string, return-code-variable );
The GASK( HTML , )routine returns the current HTML string. If a GSET( HTML , )function has not been previously submitted, GASK( HTML , )returns the default value, null.
string | the HTML string invoked when an affected DSGI graphic element in a web page is clicked. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
BAR on page 1448
ELLIPSE on page 1450
FILL on page 1451
MARK on page 1453
PIE on page 1455
TEXT on page 1456
HTML on page 1475
Finds the current setting of the color to be used to draw lines
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( LINCOLOR , color-index, return-code-variable );
The GASK( LINCOLOR , )routine returns the current line color. If a GSET( LINCOLOR , )function has not been previously submitted, GASK( LINCOLOR , )returns the default value, 1. The color index returned corresponds to a color specification in the following order:
the color specified in a GSET( COLREP , )function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list.
color-index | numeric variable name; returns the color index of the current line color. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
COLREP on page 1467
LINCOLOR on page 1476
Finds the index of the bundle of line attributes
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( LININDEX , index, return-code-variable );
The GASK( LININDEX , )routine returns the current line bundle. If no line bundles have been previously defined with GSET( LINREP , )or activated with GSET( LININDEX , ), GASK( LININDEX , )returns the default value, 1.
index | numeric variable name; returns the index of the current line bundle. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
LINREP on page 1420
LININDEX on page 1477
LINREP on page 1478
Finds the bundle of line attributes associated with an index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 60, 61
CALL GASK ( LINREP , index, color-index, width, type, return-code-variable );
The GASK( LINREP , )routine returns the color, width, and line type associated with a specific line bundle. If the bundle indicated by index has not been previously defined with the GSET( LINREP , )function, DSGI issues the following error message:
ERROR: A representation for the specified line type index has not been defined on this workstation.
index | numeric constant or numeric variable name; indicates the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20. |
color-index | numeric variable name; returns the color index of the fill color associated with the bundle. The color index returned corresponds to a color specification in the following order:
|
width | numeric variable name; returns the line width (in pixels) associated with the bundle. |
type | numeric variable name; returns the index of the line type associated with the bundle. Refer to Figure 7.22 on page 208 for representations of the line types. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
LININDEX on page 1420
COLREP on page 1467
LINREP on page 1478
Finds the line type
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( LINTYPE , type, return-code-variable );
The GASK( LINTYPE , )routine returns the current line type. If no line type was previously selected with the GSET( LINTYPE , )function, GASK( LINTYPE , )returns the default value, 1.
type | numeric variable name; returns the index of the line type currently selected. Refer to Figure 7.22 on page 208 for representations of the line types. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
LINTYPE on page 1479
Finds the line thickness
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( LINWIDTH , width, return-code-variable );
The GASK( LINWIDTH , )routine returns the current line width. If a line width has not been previously selected with the GSET( LINWIDTH , )function, GASK( LINWIDTH , )returns the default value, 1.
width | numeric variable name; returns the current line width (in units of pixels). |
return-code-variable | numeric variable name; returns the return code of the routine call. |
LINWIDTH on page 1479
Finds the color index of the color to be used to draw markers
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( MARCOLOR , color-index, return-code-variable );
The GASK( MARCOLOR , )routine returns the current marker color. If a GSET( MARCOLOR , )function has not been previously submitted, GASK( MARCOLOR , )returns the default value, 1. The color index returned corresponds to a color specification in the following order:
the color selected in a GSET( COLREP , )function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list.
color-index | numeric variable name; returns the color index of the current marker color. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
COLREP on page 1467
MARCOLOR on page 1480
Finds the index of the bundle of marker attributes currently selected
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( MARINDEX , index, return-code-variable );
The GASK( MARINDEX , )routine returns the current marker bundle. If no marker bundles have been previously defined with GSET( MARREP , )or activated with GSET( MARINDEX , ), GASK( MARINDEX , )returns the default value, 1.
index | numeric variable name; returns the index of the marker bundle currently selected. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
MARREP on page 1424
MARINDEX on page 1481
MARREP on page 1482
Finds the bundle of marker attributes associated with an index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 64, 65
CALL GASK( MARREP , index, color-index, size, type, return-code-variable );
The GASK( MARREP )routine returns the color, size, and type of marker associated with a specific marker bundle. If the bundle indicated by index has not been previously defined with the GSET( MARREP , )function, DSGI issues the following error message:
ERROR: A representation for the specified marker index has not been defined on this workstation.
index | numeric constant or numeric variable name; indicates the index of the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20. |
color-index | numeric variable name; returns the color index of the fill color associated with the bundle. The color index returned corresponds to a color specification in the following order:
|
size | numeric variable name; returns the marker size in units of the current window system. |
type | numeric variable name; the index of the marker type associated with the bundle. See the MARTYPE on page 1483 for an explanation of the marker indexes. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
COLREP on page 1467
MARINDEX on page 1481
MARREP on page 1482
MARTYPE on page 1483
Finds the size of markers
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( MARSIZE , size, return-code-variable );
The GASK( MARSIZE , )routine returns the current marker size. If no marker size has been previously selected with the GSET( MARSIZE , )function, GASK( MARSIZE , )returns the default value, 1.
size | numeric variable name; returns the marker size in units of the current window system. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
MARSIZE on page 1483
Finds the kind of markers
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( MARTYPE , type, return-code-variable );
The GASK( MARTYPE , )routine returns the current marker type. If no marker type has been previously selected with the GSET( MARTYPE , )function, GASK( MARTYPE , )returns the default value, 1.
type | numeric variable name; returns the index of the marker type currently selected. See the function MARTYPE on page 1483 for an explanation of the indexes for markers. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
MARTYPE on page 1483
Finds the maximum display area size
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK ( MAXDISP , units, x-dim, y-dim, x-pixels, y-pixels, return-code-variable );
The GASK( MAXDISP , ) routine returns the dimensions of the maximum display area for the device. This routine is useful when you need to know the maximum display area in order to determine the aspect ratio or to scale a graph.
There is a difference between the maximum display size returned when the operating state is not SGOP and when it is SGOP. The full addressable display area is returned when the operating state is not SGOP, and the display area minus room for titles and footnotes is returned when the operating state is SGOP.
units | numeric variable name; returns a 1 to show that x-dim and y-dim are in meters . |
x-dim | numeric variable name; returns the dimension, in meters, in the x direction. |
y-dim | numeric variable name; returns the dimension, in meters, in the y direction. |
x-pixels | numeric variable name; returns the number of pixels in the x direction. |
y-pixels | numeric variable name; returns the number of pixels in the y direction. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
HSIZE on page 1418
VSIZE on page 1443
HSIZE on page 1475
VSIZE on page 1499
Finds the number of graphs in the current catalog
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( NUMGRAPH , n, return-code-variable );
The GASK( NUMGRAPH , ) routine returns how many graphs are in the current catalog. The catalog checked is the catalog selected in the GSET( CATALOG , ) function, if specified; otherwise , it is the default catalog, WORK.GSEG.
n | numeric variable name; returns the number of graphs in the current catalog. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
CATALOG on page 1407
CATALOG on page 1465
Finds the name of the segment currently open
Operating States: SGOP
Return Codes: 0, 4
CALL GASK( OPENGRAPH , name, return-code-variable );
The GASK( OPENGRAPH , ) routine returns the name of the graph that is currently open.
The name returned is one of the following:
the name specified in the GRAPH( CLEAR , ) function
if the name is omitted from the GRAPH( CLEAR , ) function, some form of DSGI: for example, DSGI, DSGI1, and DSGI2.
name | character variable name; returns the name of the graph that is currently open. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
CLEAR on page 1457
Finds the pattern name assigned to a style index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8. 79
CALL GASK( PATREP , index, pattern-name, hatch-name, return-code-variable);
The GASK( PATREP , ) routine returns the pattern name assigned to a style index.
index | numeric variable name; returns the index of the pattern currently selected. |
pattern-name | character variable name; returns the name of the pattern at the specified index. |
hatch-name | character variable name; returns the name of the hatch at the specified index. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
PATREP on page 1485
Finds the current operating state of DSGI
Operating States: All
Return Codes:
CALL GASK( STATE , status );
The GASK( STATE , ) routine returns the current operating state of DSGI.
status | character variable name; returns one of the following values: |
|
WSACTIVE on page 1445
WSOPEN on page 1445
Finds the horizontal and vertical alignment of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXALIGN , halign, valign, return-code-variable );
The GASK( TEXALIGN , ) routine returns the current horizontal and vertical text alignment. If no values have been previously selected with the GSET( TEXALIGN , ) function, GASK( TEXALIGN , ) returns the default value NORMAL for both halign and valign .
halign | character variable name; indicates the horizontal alignment set by the GSET( TEXALIGN , ) function; returns one of the following values: |
| |
valign | character variable name; indicates the vertical alignment set by the GSET( TEXALIGN , ) function; returns one of the following values: |
| |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TEXPATH on page 1436
TEXUP on page 1438
TEXALIGN on page 1486
Finds the color index of the color currently selected to draw text strings
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXCOLOR , color-index, return-code-variable );
The GASK( TEXCOLOR , ) routine returns the current text color. If a GSET( TEXCOLOR , ) function has not been previously submitted, GASK( TEXCOLOR , ) returns the default value, 1. The color index returned corresponds to a color specification in the following order:
the color specified in a GSET( COLREP , ) function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list.
color-index | numeric variable name; returns the color index of the color used to draw text. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
COLREP on page 1467
TEXCOLOR on page 1488
Finds the text extent rectangle and concatenation point for a specified text string
Operating States: SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK ( TEXEXTENT , x, y, string, x-end, y-end, x1, x2, x3, x4, y1, y2, y3, y4, return-code-variable );
The GASK( TEXEXTENT , ) routine returns the text extent rectangle and text concatenation point for a specified text string. All text extent coordinates returned are in units of the current window system. If no text string is specified for string , GASK( TEXEXTENT , ) does not return values for the other arguments.
The text attributes and bundles affect the values returned by this query. See Figure 50.1 on page 1433 for a diagram of the text extent rectangle (in the figure, x,y is always the place where the text string starts).
x | numeric variable name; x coordinates are in units based on the current window system; returns x coordinate after justification. The variable used to specify x must be initialized. |
y | numeric variable name; y coordinates are in units based on the current window system; returns y coordinate after justification. The variable used to specify y must be initialized. |
string | character string enclosed in single quotation marks or a character variable name; a set of characters for which the text extent rectangle and text concatenation point are calculated. |
x-end | numeric variable name; returns the x coordinate of the point at which the next text string may be concatenated . |
y-end | numeric variable name; returns the y coordinate of the point at which the next text string may be concatenated. |
x1 , x2 , x3 , x4 , y1 , y2 , y3 , y4 | numeric variable names; return the text extent rectangles of the text strings as shown in Figure 50.1 on page 1433. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
WINDOW on page 1444
TEXT on page 1456
Finds the font used to draw text strings
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXFONT , font, return-code-variable );
The GASK( TEXFONT ) routine returns the current text font. GASK( TEXFONT , ) searches for the current font in the following order:
the value selected in the GSET( TEXFONT , ) function, if specified
the value of the FTEXT= graphics option, if specified
the device s default hardware font if the device supports a hardware font
the SIMULATE font.
font | character variable name; returns the font name. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
FTEXT= graphics options in (see FTEXT on page 294)
TEXFONT on page 1489
Finds the character height of the text strings
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXHEIGHT , height, return-code-variable );
The GASK( TEXHEIGHT , ) routine returns the current text height. GASK( TEXHEIGHT , ) searches for the current text height in the following order:
the value selected in the GSET( TEXHEIGHT , ) function, if specified
the value of the HTEXT= graphics option, if specified
the default text height, 1.
height | numeric variable name; returns the character height in units of the current window system. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TEXHEIGHT on page 1490
HTEXT= graphics options (see HTEXT on page 316)
Finds the index of the bundle of text attributes currently selected
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXINDEX , index, return-code-variable );
The GASK( TEXINDEX , ) routine returns the current text bundle. If no text bundles have been previously defined with GSET( TEXREP , ) or activated with GSET( TEXINDEX , ), GASK( TEXINDEX , ) returns the default value, 1.
index | numeric variable name; returns the text bundle index. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TEXREP on page 1437
TEXREP on page 1492
TEXINDEX on page 1490
Finds the direction of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXPATH , path , return-code-variable );
The GASK( TEXPATH , ) routine returns the current text path (reading direction). If TEXPATH has not been previously selected with the GSET( TEXPATH , ) function, GASK( TEXPATH , ) returns the default value, RIGHT. See the TEXPATH on page 1491 for an illustration of text paths.
path | character variable name; returns one of the following values: |
| |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TEXALIGN on page 1430
TEXUP on page 1438
TEXPATH on page 1491
Finds the attribute settings associated with a text bundle
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 68, 69
CALL GASK( TEXREP , index, color-index, font, return-code-variable );
The GASK( TEXREP , ) routine returns the color and font associated with a specific text bundle. If the bundle indicated by index has not been previously defined with the GSET( TEXREP , ) function, DSGI issues the following error message:
ERROR: A representation for the specified text index has not been defined on this workstation.
index | numeric constant or numeric variable name; indicates the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20. |
color-index | numeric variable name; returns the color index of the fill color associated with the bundle. The color index that is returned corresponds to a color specification in the following order: |
| |
font | character variable name; returns the text font associated with the bundle. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
COLORS= graphics option (see COLORS on page 272)
COLREP on page 1410
COLREP on page 1467
TEXREP on page 1492
Finds the orientation (angle) of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TEXUP , up-x, up-y, return-code-variable );
The GASK( TEXUP , ) routine returns the character up vector values. If TEXUP has not been previously selected with the GSET( TEXUP , ) function, GASK( TEXUP , ) returns the default values for x and y , 0 and 1. See the TEXUP on page 1493 for an explanation of the vector values.
up-x | numeric variable name; returns the x component of the vector. |
up-y | numeric variable name; returns the y component of the vector. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TEXALIGN on page 1430
TEXPATH on page 1436
TEXUP on page 1493
Finds the viewport and window coordinates associated with a transformation number
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 50
CALL GASK ( TRANS , n, vllx, vlly, vurx, vury, wllx, wlly, wurx, wury, return-code-variable );
The GASK( TRANS , ) routine returns the viewport and window coordinates associated with a particular transformation number. GASK( TRANS , ) returns the default coordinates for viewports and windows if other coordinates have not been defined for the transformation specified.
n | numeric constant or numeric variable name; indicates the number of the transformation to check. Valid values are 0 to 20, inclusive. If n is expressed as a variable, the variable must be initialized to a value between 0 and 20. |
vllx | numeric variable name; returns the x coordinate of the lower-left viewport corner. |
vlly | numeric variable name; returns the y coordinate of the lower-left viewport corner. |
vurx | numeric variable name; returns the x coordinate of the upper-right viewport corner. |
vury | numeric variable name; returns the y coordinate of the upper-right viewport corner. |
wllx | numeric variable name; returns the x coordinate of the lower-left window corner. |
wlly | numeric variable name; returns the y coordinate of the lower-left window corner. |
wurx | numeric variable name; returns the x coordinate of the upper-right window corner. |
wury | numeric variable name; returns the y coordinate of the upper-right window corner. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TRANSNO on page 1440
VIEWPORT on page 1441
WINDOW on page 1444
TRANSNO on page 1496
VIEWPORT on page 1497
WINDOW on page 1500
Finds the number of the transformation to be used
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
CALL GASK( TRANSNO , n, return-code-variable );
The GASK( TRANSNO , ) routine returns the current transformation. If a transformation has not been previously selected with the GSET( TRANSNO , ) function, GASK( TRANSNO , ) returns the number of the default transformation, 0.
n | numeric variable name; returns the number of the current transformation. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TRANS on page 1439
VIEWPORT on page 1441
WINDOW on page 1444
VIEWPORT on page 1497
WINDOW on page 1500
TRANSNO on page 1496
Finds coordinates of the viewport associated with a transformation number
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 50
CALL GASK( VIEWPORT , n, llx, lly, urx, ury, return-code-variable );
The GASK( VIEWPORT , ) routine returns the coordinates of the viewport associated with the specified transformation. If a viewport has not been defined with the GSET( VIEWPORT , ) function for the specified transformation, n , GASK( VIEWPORT , ) returns the default coordinates for the viewport, (0, 0) and (1, 1).
n | numeric constant or numeric variable name; indicates the transformation number assigned to the viewport to check. Valid values are 0 to 20, inclusive. If n is expressed as a variable, the variable must be initialized to a value between 0 and 20. |
llx | numeric variable name; returns the x coordinate of the lower-left corner. |
lly | numeric variable name; returns the y coordinate of the lower-left corner. |
urx | numeric variable name; returns the x coordinate of the upper-right corner. |
ury | numeric variable name; returns the y coordinate of the upper-right corner. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TRANS on page 1439
TRANSNO on page 1440
WINDOW on page 1444
TRANSNO on page 1496
VIEWPORT on page 1497
WINDOW on page 1500
Finds the number of rows
Operating States: All
Return Codes:
CALL GASK( VPOS , vpos, return-code-variable );
The GASK( VPOS , ) routine returns the current number of rows in the graphics output area. GASK( VPOS , ) searches for the current number of rows in the following order:
the value selected in the GSET( VPOS , ) function
the value of the VPOS= graphics option
the device s default VPOS value found in the device entry.
vpos | numeric variable name; returns the number of rows in the graphics output area. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
HPOS on page 1417
VSIZE on page 1443
VPOS on page 1498
VPOS= graphics option (see VPOS on page 360)
Finds the vertical dimension of the graphics output area
Operating States: All
Return Codes:
CALL GASK( VSIZE , vsize, return-code-variable );
The GASK( VSIZE , ) routine returns the current vertical dimension, in inches, of the graphics output area. GASK( VSIZE , ) searches for the current vertical dimension in the following order:
the value selected in the GSET( VSIZE , ) function
the value of the VSIZE= graphics option
the device s default VSIZE found in the device entry.
vsize | numeric variable name; returns the size of the graphics output area in the y dimension (in inches). |
return-code-variable | numeric variable name; returns the return code of the routine call. |
HSIZE on page 1418
VPOS on page 1442
VSIZE on page 1499
VSIZE= graphics option (see VSIZE on page 361)
Finds the coordinates of the window associated with a transformation number
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 50
CALL GASK( WINDOW , n, llx, lly, urx, ury, return-code-variable );
The GASK( WINDOW , ) routine returns the coordinates of the window associated with the specified transformation number. If no window has been defined with the GSET( WINDOW , ) function for transformation n , GASK( WINDOW , ) returns the default window coordinates, which are device dependent.
n | numeric constant or numeric variable name; indicates the transformation number of the window to check. Valid values are 0 to 20, inclusive. If n is expressed as a variable, the variable must be initialized to a value between 0 and 20. |
llx | numeric variable name; returns the x coordinate of the lower-left corner. |
lly | numeric variable name; returns the y coordinate of the lower-left corner. |
urx | numeric variable name; returns the x coordinate of the upper-right corner. |
ury | numeric variable name; returns the y coordinate of the upper-right corner. |
return-code-variable | numeric variable name; returns the return code of the routine call. |
TRANS on page 1439
TRANSNO on page 1440
VIEWPORT on page 1441
TRANSNO on page 1496
VIEWPORT on page 1497
WINDOW on page 1500
Finds whether the interface is active
Operating States: All
Return Codes: 29, 30
CALL GASK( WSACTIVE , status );
The GASK( WSACTIVE , ) routine asks if the workstation is active. When the workstation is active, you can execute certain DSGI routines and functions.
status | numeric variable name; returns either 29 (active) or 30 (inactive). |
STATE on page 1430
WSOPEN on page 1445
Finds whether the interface is open
Operating States: All
Return Codes: 24, 25
CALL GASK( WSOPEN , status );
The GASK( WSOPEN , ) routine asks if the workstation is open. If a workstation is open, the graphics catalog can be accessed.
status | numeric variable name; returns either 24 (open) or 25 (closed). |
WSACTIVE on page 1445