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/pmio/pmline.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/pmio/pmline.x')
-rw-r--r-- | sys/pmio/pmline.x | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/pmio/pmline.x b/sys/pmio/pmline.x new file mode 100644 index 00000000..36be1cb4 --- /dev/null +++ b/sys/pmio/pmline.x @@ -0,0 +1,36 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <pmset.h> +include <plio.h> + +# PM_LINE -- Perform a rasterop operation upon a line of arbitrary width drawn +# at an arbitrary orientation in 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_line (pl, x1, y1, x2, y2, width, rop) + +pointer pl #I mask descriptor +int x1,y1 #I start point of line +int x2,y2 #I end point of line +int width #I width of line to be drawn, pixels +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] = x1; v1[2] = y1 + call imaplv (PM_REFIM(pl), v1, v2, PM_MAXDIM) + + call pl_getplane (pl, v3) + v3[1] = x2; v3[2] = y2 + call imaplv (PM_REFIM(pl), v3, v4, PM_MAXDIM) + + call pl_line (pl, v2[1],v2[2], v4[1],v4[2], width, rop) + + } else + call pl_line (pl, x1, y1, x2, y2, width, rop) +end |