diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/plio/plglp.gx | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/plio/plglp.gx')
-rw-r--r-- | sys/plio/plglp.gx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sys/plio/plglp.gx b/sys/plio/plglp.gx new file mode 100644 index 00000000..d5803033 --- /dev/null +++ b/sys/plio/plglp.gx @@ -0,0 +1,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_glp$t (pl, v, px_dst, px_depth, npix, rop) + +pointer pl #I mask descriptor +long v[PL_MAXDIM] #I vector coords of line segment +PIXEL 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_l2p$t() +errchk pl_access + +begin + ll_src = pl_access (pl,v) + if (!R_NEED_DST(rop)) { + np = pl_l2p$t (Mems[ll_src], v[1], px_dst, npix) + return + } + + call smark (sp) + call salloc (px_out, npix, TY_PIXEL) + + np = pl_l2p$t (Mems[ll_src], v[1], Mem$t[px_out], npix) + call pl_pixrop$t (Mem$t[px_out], 1, PL_MAXVAL(pl), + px_dst, 1, MV(px_depth), npix, rop) + + call sfree (sp) +end |