summaryrefslogtreecommitdiff
path: root/ipl/gprogs/isd2xgrid.icn
blob: 01f8cb270075d32eb036dc7db20fe94c7cf8a559 (plain)
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
57
58
############################################################################
#
#	File:     isd2xgrid.icn
#
#	Subject:  Program to create grid plots for ISDs
#
#	Author:   Ralph E. Griswold
#
#	Date:     July 4, 2002
#
############################################################################
#
#  NOTE:  The drawdown code is patched in from code in pfd2ill.icn and
#  uses a different method than the others.  One way or another, the
#  methods should be made consonant.
#
#  The option -n s allows a basename to be specified for the image file.
#  It defaults to the name in the ISD.
#
#  This version is for ISDs without explicit thread-color information.
#
############################################################################
#
#  Requires:  Version 9 graphics and large integers
#
############################################################################
#
#  Links:  isdxplot, options, wopen, xcode
#
############################################################################
#
#  Note:  The include file may contain link declarations.
#
############################################################################

link isdxplot
link options
link wopen
link xcode

procedure main(args)
   local draft, win, opts

   opts := options(args, "n:")

   isd			# hands off, linker!

   draft := xdecode(&input) | stop("*** cannot decode draft")

   draft.name := \opts["n"]

   &dump := 1
   win := plot(draft, "clip") | stop("*** plot() failed")
   &dump := 0

   WriteImage(win, draft.name || "_d.gif")

end