diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/gio/gks/gqtxal.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/gio/gks/gqtxal.x')
-rw-r--r-- | sys/gio/gks/gqtxal.x | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/sys/gio/gks/gqtxal.x b/sys/gio/gks/gqtxal.x new file mode 100644 index 00000000..36a90186 --- /dev/null +++ b/sys/gio/gks/gqtxal.x @@ -0,0 +1,65 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gset.h> +include "gks.h" + +# GQTXAL -- Inquire text alignment. + +procedure gqtxal (ierror, txalh, txalv) + +int ierror # Error indicator; ierror = 0 means no error +int txalh # Horizontal text alignment +int txalv # Vertical text alignment + +int justify +int gstati() +include "gks.com" + +begin + if (gk_std == NULL) { + # GKS not in proper state; no active workstations + ierror = 7 + txalh = -1 + txalv = -1 + return + } else + ierror = 0 + + iferr { + # Get value of horizontal text justification + justify = gstati (gp[gk_std], G_TXHJUSTIFY) + + switch (justify) { + case GT_NORMAL: + txalh = GAHNOR + case GT_CENTER: + txalh = GACENT + case GT_LEFT: + txalh = GALEFT + case GT_RIGHT: + txalh = GARITE + default: + txalh = GAHNOR + } + + # Get value of vertical text justification + justify = gstati (gp[gk_std], G_TXVJUSTIFY) + + switch (justify) { + case GT_NORMAL: + txalv = GAVNOR + case GT_CENTER: + txalv = GAHALF + case GT_TOP: + txalv = GATOP + case GT_BOTTOM: + txalv = GABOTT + default: + txalv = GAVNOR + } + } then { + ierror = 1 + txalv = -1 + txalh = -1 + } +end |