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/gio/gplflush.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/gio/gplflush.x')
-rw-r--r-- | sys/gio/gplflush.x | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sys/gio/gplflush.x b/sys/gio/gplflush.x new file mode 100644 index 00000000..403adc9c --- /dev/null +++ b/sys/gio/gplflush.x @@ -0,0 +1,51 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gki.h> +include <gio.h> + +# GPL_FLUSH -- Flush the buffered "polyline", i.e., array of transformed and +# clipped points. For a polyline or fill area polygon there must be at least +# two points (4 cells) or it will be discarded. A single point polymarker is +# permitted. + +procedure gpl_flush() + +int fd +pointer ap +include "gpl.com" + +begin + if (op > 2 && gp_out != NULL) { + fd = GP_FD(gp_out) + + switch (pl_type) { + case POLYMARKER: + ap = GP_PMAP(gp_out) + if (PM_STATE(ap) != FIXED) { + call gki_pmset (fd, ap) + PM_STATE(ap) = FIXED + } + call gki_polymarker (fd, pl, op / 2) + + case FILLAREA: + ap = GP_FAAP(gp_out) + if (FA_STATE(ap) != FIXED) { + call gki_faset (fd, ap) + FA_STATE(ap) = FIXED + } + if (op > 4) + call gki_fillarea (fd, pl, op / 2) + + default: # (case POLYLINE) + ap = GP_PLAP(gp_out) + if (PL_STATE(ap) != FIXED) { + call gki_plset (fd, ap) + PL_STATE(ap) = FIXED + } + if (op > 4) + call gki_polyline (fd, pl, op / 2) + } + + op = 1 + } +end |