aboutsummaryrefslogtreecommitdiff
path: root/sys/plio/tf/plglps.x
blob: 728beb0a1e9a47d2b9bf9e3a6fa11bf623d099ab (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
32
33
34
35
36
37
38
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<plio.h>

# PL_GLP -- Get a line segment as a pixel array, applying the given ROP to
# combine the pixels with those of the output array.

procedure pl_glps (pl, v, px_dst, px_depth, npix, rop)

pointer	pl			#I mask descriptor
long	v[PL_MAXDIM]		#I vector coords of line segment
short	px_dst[ARB]		#O output pixel array
int	px_depth		#I pixel depth, bits
int	npix			#I number of pixels desired
int	rop			#I rasterop

int	np
pointer	sp, px_out, ll_src
pointer	pl_access()
int	pl_l2ps()
errchk	pl_access

begin
	ll_src = pl_access (pl,v)
	if (!R_NEED_DST(rop)) {
	    np = pl_l2ps (Mems[ll_src], v[1], px_dst, npix)
	    return
	}

	call smark (sp)
	call salloc (px_out, npix, TY_SHORT)

	np = pl_l2ps (Mems[ll_src], v[1], Mems[px_out], npix)
	call pl_pixrops (Mems[px_out], 1, PL_MAXVAL(pl),
	    px_dst, 1, MV(px_depth), npix, rop)

	call sfree (sp)
end