aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gks/gqchh.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/gio/gks/gqchh.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/gks/gqchh.x')
-rw-r--r--sys/gio/gks/gqchh.x39
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