blob: b165b7cccd72c1b673c53c7af2522ede3f5f3e3f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
|