diff options
Diffstat (limited to 'sys/gio/gks/gqchh.x')
-rw-r--r-- | sys/gio/gks/gqchh.x | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys/gio/gks/gqchh.x b/sys/gio/gks/gqchh.x new file mode 100644 index 00000000..733d0a2a --- /dev/null +++ b/sys/gio/gks/gqchh.x @@ -0,0 +1,39 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gset.h> +include "gks.h" + +# GQCHH - Inquire character height. + +procedure gqchh (ierror, chh) + +int ierror # Error indicator +real chh # Character height, in world coordinates + +real dx, dy +real gstatr() +include "gks.com" +errchk gstatr, ggscale + +begin + if (gk_std == NULL) { + # GKS not in proper state; no active workstations + ierror = 7 + chh = -1.0 + return + } else + ierror = 0 + + iferr { + chh = gstatr (gp[gk_std], G_CHARSIZE) + + # The character height is expressed in NDC units. It must be + # converted to world coordinates before returning. + + call ggscale (gp[gk_std], 0., 0., dx, dy) + chh = chh * dy + } then { + ierror = 1 + chh = -1.0 + } +end |