aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gks/gschup.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/gschup.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/gks/gschup.x')
-rw-r--r--sys/gio/gks/gschup.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/gio/gks/gschup.x b/sys/gio/gks/gschup.x
new file mode 100644
index 00000000..d7698c41
--- /dev/null
+++ b/sys/gio/gks/gschup.x
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <gset.h>
+
+# GSCHUP -- Set character up vector.
+
+procedure gschup (chux, chuy)
+
+real chux, chuy # Character up vector, in world coordinates
+int char_up
+bool fp_equalr()
+
+begin
+ # Find the angle normal to the text baseline. The angle is stored
+ # in degrees between -180 and +180.
+
+ if (fp_equalr (chux, 0.0))
+ char_up = 90
+ else
+ char_up = nint (atan2 (chuy, chux) * 180. / 3.1415926)
+
+ call gsawi (G_TXUP, char_up)
+end