aboutsummaryrefslogtreecommitdiff
path: root/sys/pmio/pmpoint.x
blob: c464c47ebb18036228ee6ca5f1552c8f2130075f (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
29
30
31
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include <pmset.h>
include	<plio.h>

# PM_POINT -- Perform a rasterop operation on a single point in a line of a
# 2-dimensional plane of a mask.  If the dimensionality of the mask exceeds 2,
# the pm_setplane() procedure should be called first to define the plane of
# the mask to be modified.

procedure pm_point (pl, x, y, rop)

pointer	pl			#I mask descriptor
int	x			#I pixel to be modified
int	y			#I line to be modified
int	rop			#I rasterop defining operation

errchk	pl_getplane
include	"pmio.com"

begin
	if (PM_MAPXY(pl) == YES) {
	    call pl_getplane (pl, v1)
	    v1[1] = x;  v1[2] = y
	    call imaplv (PM_REFIM(pl), v1, v2, PM_MAXDIM)

	    call pl_point (pl, v2[1], v2[2], rop)

	} else
	    call pl_point (pl, x, y, rop)
end