aboutsummaryrefslogtreecommitdiff
path: root/sys/plio/tf/plplrl.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/plio/tf/plplrl.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/plio/tf/plplrl.x')
-rw-r--r--sys/plio/tf/plplrl.x41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys/plio/tf/plplrl.x b/sys/plio/tf/plplrl.x
new file mode 100644
index 00000000..bf40b9ef
--- /dev/null
+++ b/sys/plio/tf/plplrl.x
@@ -0,0 +1,41 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <plio.h>
+
+# PL_PLR -- Put a line segment input as a range list to a mask, applying the
+# given ROP to combine the line segment with the existing line of the mask.
+
+procedure pl_plrl (pl, v, rl_src, rl_depth, npix, rop)
+
+pointer pl #I mask descriptor
+long v[PL_MAXDIM] #I vector coords of line segment
+long rl_src[ARB] #I input range list
+int rl_depth #I range list depth, bits
+int npix #I number of pixels to be set
+int rop #I rasterop
+
+int ll_len
+pointer sp, ll_src, ll_out, ll_dst
+pointer pl_access()
+int pl_r2ll()
+errchk pl_access
+
+begin
+ call smark (sp)
+ call salloc (ll_src, LL_MAXLEN(pl), TY_SHORT)
+
+ # Convert the range list to a line list.
+ ll_len = pl_r2ll (rl_src, 1, Mems[ll_src], npix)
+
+ if (!R_NEED_DST(rop) && v[1] == 1 && npix == PL_AXLEN(pl,1))
+ call pl_update (pl, v, Mems[ll_src])
+ else {
+ call salloc (ll_out, LL_MAXLEN(pl), TY_SHORT)
+ ll_dst = pl_access (pl,v)
+ call pl_linerop (Mems[ll_src], 1, PL_MAXVAL(pl), Mems[ll_dst], v[1],
+ MV(rl_depth), Mems[ll_out], npix, rop)
+ call pl_update (pl, v, Mems[ll_out])
+ }
+
+ call sfree (sp)
+end