From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/gio/gks/gqchh.x | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sys/gio/gks/gqchh.x (limited to 'sys/gio/gks/gqchh.x') 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 +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 -- cgit