diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/images/tv/iis/ids/idspm.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/tv/iis/ids/idspm.x')
-rw-r--r-- | pkg/images/tv/iis/ids/idspm.x | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/ids/idspm.x b/pkg/images/tv/iis/ids/idspm.x new file mode 100644 index 00000000..b165b7cc --- /dev/null +++ b/pkg/images/tv/iis/ids/idspm.x @@ -0,0 +1,56 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gki.h> +include "../lib/ids.h" + +# nspp particulars +# base width of line +define BASELW 8 + +# IDS_POLYMARKER -- Draw a polymarker. The polymarker 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_polymarker (p, npts) + +short p[ARB] # points defining line +int npts # number of points, i.e., (x,y) pairs + +pointer pm +int i, len_p +int linewidth +short x,y + +include "../lib/ids.com" + +begin + if ( npts <= 0) + return + + len_p = npts * 2 + + # Update polymarker attributes if necessary. + + pm = IDS_PMAP(i_kt) + + if (IDS_TYPE(i_kt) != PM_LTYPE(pm)) { + call ids_line(PM_LTYPE(pm)) + IDS_TYPE(i_kt) = PM_LTYPE(pm) + } + if (IDS_WIDTH(i_kt) != PM_WIDTH(pm)) { + linewidth = int(real(BASELW) * GKI_UNPACKREAL(PM_WIDTH(pm))) + i_linewidth = max(1,linewidth) + IDS_WIDTH(i_kt) = PM_WIDTH(pm) + } + if (IDS_COLOR(i_kt) != PM_COLOR(pm)) { + i_linecolor = PM_COLOR(pm) + IDS_COLOR(i_kt) = PM_COLOR(pm) + } + + for (i=1; i <= len_p; i=i+2) { + x = p[i] + y = p[i+1] + call ids_point (real(x)/GKI_MAXNDC, real(y)/GKI_MAXNDC, true) + } +end |