aboutsummaryrefslogtreecommitdiff
path: root/sys/pmio/pmclear.x
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pmio/pmclear.x')
-rw-r--r--sys/pmio/pmclear.x28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/pmio/pmclear.x b/sys/pmio/pmclear.x
new file mode 100644
index 00000000..1aed4013
--- /dev/null
+++ b/sys/pmio/pmclear.x
@@ -0,0 +1,28 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <imhdr.h>
+include <pmset.h>
+include <plio.h>
+
+# PM_CLEAR -- Clear a mask. The entire surface is cleared. This is equivalent
+# to a full surface pm_rop with rop=PIX_CLR, but is more convenient and can be
+# implemented more efficiently since the entire surface is cleared.
+
+procedure pm_clear (pl)
+
+pointer pl #I mask descriptor
+
+include "pmio.com"
+
+begin
+ if (PM_MAPXY(pl) == YES) {
+ call amovkl (1, v1, PM_MAXDIM)
+ call imaplv (PM_REFIM(pl), v1, v2, PM_MAXDIM)
+ call amovl (IM_LEN(PM_REFIM(pl),1), v3, PM_MAXDIM)
+ call imaplv (PM_REFIM(pl), v3, v4, PM_MAXDIM)
+
+ call pl_rop (NULL, NULL, pl, v2, v4, PIX_CLR)
+
+ } else
+ call pl_clear (pl)
+end