aboutsummaryrefslogtreecommitdiff
path: root/sys/plio/plclear.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/plio/plclear.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/plio/plclear.x')
-rw-r--r--sys/plio/plclear.x32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/plio/plclear.x b/sys/plio/plclear.x
new file mode 100644
index 00000000..5ece1b5d
--- /dev/null
+++ b/sys/plio/plclear.x
@@ -0,0 +1,32 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <plio.h>
+
+# PL_CLEAR -- Clear a mask. The entire surface is cleared. This is equivalent
+# to a full surface pl_rop with rop=PIX_CLR, but is more convenient and can be
+# implemented more efficiently since the entire surface is cleared.
+
+procedure pl_clear (pl)
+
+pointer pl #I mask descriptor
+
+pointer lp
+int n_len, i
+errchk realloc
+
+begin
+ # Clear the line list buffer.
+ lp = Ref (pl, PL_EMPTYLINE)
+ PL_LLOP(pl) = LP_BLEN(lp)
+ LP_NREFS(lp) = PL_NLP(pl)
+
+ do i = 1, PL_NLP(pl)
+ PL_LP(pl,i) = PL_EMPTYLINE
+
+ n_len = PL_LLBUFLEN
+ call realloc (PL_LLBP(pl), n_len, TY_SHORT)
+
+ PL_LLLEN(pl) = n_len
+ PL_LLFREE(pl) = 0
+ PL_LLNUPDATES(pl) = 0
+end