aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gvline.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/gvline.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/gvline.x')
-rw-r--r--sys/gio/gvline.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/gio/gvline.x b/sys/gio/gvline.x
new file mode 100644
index 00000000..929fab44
--- /dev/null
+++ b/sys/gio/gvline.x
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# GVLINE -- Vector polyline. Draw a line connecting the points (X[i],V[i]),
+# where the X[i] are evenly distributed from X1 to X2.
+
+procedure gvline (gp, v, npts, x1, x2)
+
+pointer gp # graphics descriptor
+real v[ARB] # Y coordinates of the polyline
+int npts # number of polyline points
+real x1, x2 # range of X coordinates of the polyline
+
+int i
+real dx
+
+begin
+ if (npts > 1) {
+ dx = (x2 - x1) / (npts - 1)
+ call gamove (gp, x1, v[1])
+ do i = 2, npts
+ call gadraw (gp, (i-1) * dx + x1, v[i])
+ }
+end