From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/images/tv/iis/ids/idspl.x | 61 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkg/images/tv/iis/ids/idspl.x (limited to 'pkg/images/tv/iis/ids/idspl.x') diff --git a/pkg/images/tv/iis/ids/idspl.x b/pkg/images/tv/iis/ids/idspl.x new file mode 100644 index 00000000..77ac3bc3 --- /dev/null +++ b/pkg/images/tv/iis/ids/idspl.x @@ -0,0 +1,61 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include "../lib/ids.h" + +# nspp particulars +# base width of line +define BASELW 8 + +# IDS_POLYLINE -- Draw a polyline. The polyline is defined by the array of +# points P, consisting of successive (x,y) coordinate pairs. The first point +# is not plotted but rather defines the start of the polyline. The remaining +# points define line segments to be drawn. + +procedure ids_polyline (p, npts) + +short p[ARB] # points defining line +int npts # number of points, i.e., (x,y) pairs + +pointer pl +int i, len_p +int linewidth + +include "../lib/ids.com" + +begin + if ( npts <= 0) + return + + len_p = npts * 2 + + # Update polyline attributes if necessary. + + pl = IDS_PLAP(i_kt) + + if (IDS_TYPE(i_kt) != PL_LTYPE(pl)) { + call ids_line(PL_LTYPE(pl)) + IDS_TYPE(i_kt) = PL_LTYPE(pl) + } + if (IDS_WIDTH(i_kt) != PL_WIDTH(pl)) { + linewidth = int(real(BASELW) * GKI_UNPACKREAL(PL_WIDTH(pl))) + i_linewidth = max(1,linewidth) + IDS_WIDTH(i_kt) = PL_WIDTH(pl) + } + if (IDS_COLOR(i_kt) != PL_COLOR(pl)) { + i_linecolor = PL_COLOR(pl) + IDS_COLOR(i_kt) = PL_COLOR(pl) + } + + # Move to the first point. point() will plot it, which is + # ok here, and vector may well plot it again. + + call ids_point(p[1], p[2], true) + + # Draw the polyline. + + for (i=3; i <= len_p; i=i+2) { + call ids_vector ( p[i], p[i+1]) + + } +end -- cgit