aboutsummaryrefslogtreecommitdiff
path: root/sys/pmio/pmclear.x
blob: 1aed40133d9b2ef61dc2f178e5ae1bf929f3c766 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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