aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/cursor/gtrframe.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/gio/cursor/gtrframe.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/gio/cursor/gtrframe.x')
-rw-r--r--sys/gio/cursor/gtrframe.x41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys/gio/cursor/gtrframe.x b/sys/gio/cursor/gtrframe.x
new file mode 100644
index 00000000..baf68ffb
--- /dev/null
+++ b/sys/gio/cursor/gtrframe.x
@@ -0,0 +1,41 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <gio.h>
+include <gki.h>
+include "gtr.h"
+
+# GTR_FRAME -- Clear the frame buffer, used to spool the metacode instructions
+# required to draw a graphics frame. This is done by moving the metacode data
+# at the end of the buffer (beginning with the word pointed to by gki) to the
+# beginning of the buffer and adjusting the input and output pointers
+# accordingly. The workstation transformation is also reset to the unitary
+# transformation when the frame is cleared, i.e., zoom is cancelled.
+
+procedure gtr_frame (tr, gki, stream)
+
+pointer tr # giotr descriptor
+pointer gki # pointer to first word to be preserved
+int stream # graphics stream
+
+pointer bp
+int nwords, shift
+
+begin
+ bp = TR_FRAMEBUF(tr)
+
+ if (gki > bp) {
+ nwords = TR_OP(tr) - gki
+ call amovs (Mems[gki], Mems[bp], nwords)
+ shift = gki - bp
+ TR_IP(tr) = TR_IP(tr) - shift
+ TR_OP(tr) = TR_OP(tr) - shift
+ } else {
+ TR_IP(tr) = bp
+ TR_OP(tr) = bp
+ }
+
+ call gtr_ptran (stream, 0., 1., 0., 1.)
+ TR_OPSB(tr) = TR_SCRATCHBUF(tr)
+ TR_LASTOP(tr) = TR_OP(tr)
+ TR_WCS(tr) = NULL
+end