diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/gio/cursor/gtrredraw.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/gio/cursor/gtrredraw.x')
-rw-r--r-- | sys/gio/cursor/gtrredraw.x | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sys/gio/cursor/gtrredraw.x b/sys/gio/cursor/gtrredraw.x new file mode 100644 index 00000000..ca2191b3 --- /dev/null +++ b/sys/gio/cursor/gtrredraw.x @@ -0,0 +1,48 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gio.h> +include "gtr.h" + +# GTR_REDRAW -- Redraw the screen from the metacode spooled in the frame +# buffer. + +procedure gtr_redraw (stream) + +int stream # graphics stream to be redrawn + +pointer tr, ip_save, op_save +pointer gtr_init() +errchk gtr_init + +begin + tr = gtr_init (stream) + + if (TR_SPOOLDATA(tr) == YES && TR_OP(tr) > TR_FRAMEBUF(tr)) { + # Rewind the input pointer into the frame buffer. + TR_IP(tr) = TR_FRAMEBUF(tr) + + # Redraw frame buffer. + call gki_clear (stream) + call giotr (stream) + + # Redraw scratch buffer (axes). Set i/o pointers to the scratch + # buffer and draw its contents. Turn off interrupts to prevent + # an interrupt from leaving the pointers pointing to the wrong + # buffer. + + if (TR_OPSB(tr) > TR_SCRATCHBUF(tr)) { + call intr_disable() + ip_save = TR_IP(tr); TR_IP(tr) = TR_SCRATCHBUF(tr) + op_save = TR_OP(tr); TR_OP(tr) = TR_OPSB(tr) + + call giotr (stream) + + TR_IP(tr) = ip_save + TR_OP(tr) = op_save + call intr_enable() + } + + # Flush graphics output. + call gki_flush (stream) + } +end |