1ICTRANS(1NCARG)                  NCAR GRAPHICS                 ICTRANS(1NCARG)
2
3
4

NAME

6       ictrans - interactive NCAR CGM translator ctrans
7

SYNOPSIS

9       ictrans [ -d device ] [ -font font ] [ -e script ]* [ -soft ] [ -bell ]
10       [ -lmin min ] [ -lmax max ] [ -lscale scale ]  [  -pal  pal_fname  ]  [
11       -Version ] [ -wid window_id ] [ device-specific options ] metafile...
12

DESCRIPTION

14       ictrans  is  the user interface to the Computer Graphics Metafile (CGM)
15       translator ctrans.  ictrans will enter command  interpreter  mode  upon
16       invocation  and await instructions from the user. When waiting for com‐
17       mands from the user, ictrans displays the prompt `ictrans>'.
18
19       Upon invocation ictrans performs a configuration of its spooled  device
20       table.  The table is configured by processing several sources.  ictrans
21       first searches for the file ncarv_spool  in  the  $NCARG_ROOT/lib/ncarg
22       directory.   If  the  file exists ictrans will load it into the spooled
23       device table. Next, ictrans searches for the file .ncarv_spool  in  the
24       user's  home  directory.  If  found,  its  contents are merged into the
25       spooler table. Finally, the NCARV_SPOOL environment variable  may  con‐
26       tain  the definition for a single spooler. If this variable is set, its
27       contents also are merged into the table. Each entry in the above set of
28       sources is identified by a name. If a conflict in names exists then the
29       last entry encountered takes precedence. i.e. the previous entry of the
30       same name is overridden.
31

OPTIONS

33       -bell  Ring the bell at the end of each frame. The default is to run in
34              silent mode.  This option is not supported by all devices.
35
36       -d device
37              Device name.  ictrans will use the Graphcap (if  it  exists)  or
38              the appropriate graphics library indicated by device;
39
40              If device is preceded by a UNIX directory path then ictrans will
41              look in that directory for  the  specified  graphcap.  Otherwise
42              ictrans  searches  the directory $NCARG_ROOT/lib/ncarg/graphcaps
43              for the graphcap.
44
45              For all device specifications except X11 output is  directed  to
46              standard  out.  In the case of X11 translation results in appro‐
47              priate calls to the X11 libraries.  See graphcap(5NCARG)  for  a
48              description  of supported devices.  See gcaps(1NCARG) for a list
49              of devices supported by your particular configuration of ctrans.
50
51              This option overrides the GRAPHCAP environment variable.
52
53       -e script
54              script is a single ictrans command. The valid  ictrans  commands
55              are  discussed  in  the  COMMANDS  section  below.   Multiple -e
56              options may appear on a single command line. Be careful  to  use
57              quotes  if  your  command contains spaces or metacharacters that
58              might be interpreted by the shell.  When  this  option  is  used
59              ictrans  does not enter interactive mode. It simply performs the
60              given commands and then exits.
61
62       -font fontcap
63              Fontcap file to be used for stroking  text.   When  interpreting
64              CGM  TEXT  command  elements use fontcap as the default font for
65              textual translation. Note: CGMs may contain textual descriptions
66              which  are not embedded in CGM TEXT elements. Hence they are not
67              influenced by fontcap specifications.  Note also that a CGM  may
68              explicitly  specify  a named font which may override a font pro‐
69              vided on the command line. The environment variable FONTCAP  may
70              also be used to specify a default fontcap.
71
72              If  fontcap  is  preceded  by a UNIX directory path then ictrans
73              will look in that directory for the specified fontcap. Otherwise
74              ictrans  searches  the  directory $NCARG_ROOT/lib/ncarg/fontcaps
75              for the fontcap.
76
77              See fontcap(5NCARG) for a description of the available fontcaps.
78              See  fcap(1NCARG)  for  a list of the fontcaps installed on your
79              system.
80
81              This option overrides the FONTCAP environment variable.
82
83       -lmin min
84              On devices which support line width scaling all lines are  guar‐
85              anteed  to  be  scaled at least min times the default line width
86              for that device. This option effectively insures that the  mini‐
87              mum value for the CGM element "LINE WIDTH" is min.
88
89       -lmax max
90              On  devices which support line width scaling all lines are guar‐
91              anteed to be scaled at most max times the default line width for
92              that  device.  This  option effectively insures that the maximum
93              value for the CGM element "LINE WIDTH" is max.  The  results  of
94              setting max less then min are undefined.
95
96       -lscale scale
97              On devices which support line width scaling all line width spec‐
98              ifications within the metafile will be scaled by scale.  will be
99              scaled scale This option is subject to modification by the -lmin
100              and -lmax options.
101
102       -pal pal_fname
103              Use the color palette defined in the file pal_fname  for  subse‐
104              quent  translation  of  the metafile. This palette will override
105              any color map  defined  by  the  CGM  being  translated.  For  a
106              description of the format of pal_fname see ras_palette(5NCARG).
107
108       -soft  Unconditionally perform software filling of all filled polygons.
109              This option may be useful for devices which have limits  on  the
110              number  of  vertices  describing a polygon. On some devices this
111              number is known and software filling is performed, as  appropri‐
112              ate, without user specification.
113
114       -Version
115              Print the version number and then exit.
116

DEVICE SPECIFIC OPTIONS

118       ictrans  accepts an identical set of device-specific options to that of
119       ctrans.   For  a  description  of  the  device-specific   options   see
120       ctrans(1NCARG).
121

COMMANDS

123   Command Structure
124       ictrans  commands  have  a simple and regular structure. Commands which
125       operate directly on the metafile being processed may be preceded  by  a
126       frame_list  which  designate  the  frames to which the command applies.
127       Some commands accept arguments. Anything following a  command  name  is
128       regarded as an argument:
129
130              ( frame [  ,frame ])* command  ( argument )*
131
132       A  comma-separated pair of frames implies the inclusive list of frames.
133       If a frame list is omitted and a command requires a frame then the cur‐
134       rent frame is used as the default. If no argument list is specified and
135       one is required then a default argument is used whenever possible.
136
137       For example, the command 1,5 8 save  /tmp/foo  would  write  the  first
138       through  fifth  and  the  eighth  frame  of  the  metafile  to the file
139       /tmp/foo.
140
141       Commands will ignore any unexpected arguments.  Command  names  may  be
142       abbreviated up to the point that they are unique.
143
144   Frame Lists
145       Frames can be addressed in several ways:
146
147       nnn    By  frame  number.   Frames  are assigned a relative number from
148              first to last in the metafile.  The first frame is numbered 1.
149
150       $      The last frame in the file.
151
152       .      The current frame.  ictrans keeps track of the last  frame  upon
153              which an operation was performed. This frame is called the "cur‐
154              rent frame".
155
156       frame+-n
157              A frame number followed by a plus sign (+) or a minus sign  (-),
158              followed  by a decimal number, specifies the frame plus or minus
159              the indicated number of frames.  frame may be omitted  in  which
160              case the current frame is assumed. For example, `10+2' addresses
161              frame 12 in the metafile.
162
163   Commands
164       !   command
165              Run command as a shell command on the local machine.
166
167       alias [ name [ def ] ]
168              Assign def to the alias name.  If def is omitted, the alias name
169              is  displayed  along  with its current definition.  If both name
170              and def are omitted, all aliases are displayed.  def is  of  the
171              form:
172
173                   : [ ctrans_args ] : [ filter_chain ]
174
175              where  ctrans_args  is  list  of  command line arguments for the
176              metafile translator ctrans and filter_chain is a set  of  simple
177              commands separated by |.  filter_chain may be terminated by > or
178              >> filename.  For example:
179
180                   ictrans> alias name1 : -d xwd : | cat > outfile
181
182              or
183
184                   ictrans> alias name2 : -d ps.mono : | filter1 | lpr
185
186
187       dup [number]
188              This command is used to set the number of times  each  frame  is
189              displayed during subsequent plotting. The default is one. If dup
190              is invoked without any arguments the current  value  of  dup  is
191              returned.
192
193       count
194              Reports number of frames contained in the file.
195
196       current
197              Reports the current frame.
198
199       file [ metafile ]
200              The  file  metafile  will  be  used  for subsequent translation.
201              ictrans uses the shell defined by the environment variable SHELL
202              (/bin/sh   by  default)  to  perform  filename  substitution  on
203              metafile.  The rules  governing  filename  substitution  are  as
204              defined  by  the working shell. If no argument is given the cur‐
205              rent metafile name is reported.
206
207       font [ font ]
208              Set the fontcap to font for future translation. This function is
209              identical  to  that of the -font option.  If font is omitted the
210              current fontcap name is reported.
211
212       help [ command ]
213              Print a usage statement for command.  If command  is  omitted  a
214              brief description of all commands is given.
215
216       [ frames ] list
217              Provide  brief  information about each metafile frame in frames.
218              If frames is omitted then the current frame is used.  If  frames
219              is  omitted and the current frame is not the last frame then the
220              current frame is incremented to the next frame in the metafile.
221
222       < frame1 > < frame2 > merge
223              Plot frame number frame1 and then plot frame number frame2  over
224              the  first  frame  without  clearing the device. The result is a
225              "merge" of the two plots. The  current  frame  is  not  changed.
226              There  are no defaults for frame1 or frame2.  The resulting plot
227              might not be what was expected. Attributes from the first frame,
228              such as color,  may override attributes in the second frame.
229
230       loop
231              Toggle loop mode on or off. When loop mode is on subsequent plot
232              commands will cause the requested frames to be plotted and  then
233              ictrans  will  proceed  to either the first frame in the defined
234              segment or the last and repeatedly  display  the  first  through
235              last  (last  through  first)  frames. Looping continues until an
236              interrupt signal is received. The determination of  which  order
237              to  loop, forwards or backwards, is made as follows: If the last
238              group of frames plotted was in ascending order loop forward.  If
239              the  last  group  of frames plotted was in descending order loop
240              backwards. If the order cannot be  determined  don't  loop.  For
241              example; if loop mode is set "1 3,4 plot" will result in forward
242              looping, "1 4,3 plot" will result in backward looping, and  "3,4
243              1  plot"  will  result  in  no looping because the last group of
244              frames plotted, "1", is a single frame.
245
246       movie [ time ]
247              Display each frame for time seconds before proceding to the next
248              frame  during  subsequent  plots.  If time is omitted then movie
249              mode is toggled off or on. In the case the movie mode is toggled
250              on the default time is zero seconds. If movie mode is toggled to
251              off a newline must be received  before  advancing  to  the  next
252              frame during plotting.
253
254       next
255              Multiple  files may be specified on the ictrans command line. To
256              edit the next file in the argument list use the next command.
257
258       [ frames ] plot
259              Plot the addressed frames. If frames is omitted then the current
260              frame  is  plotted  and if possible, the current frame number is
261              incremented. If "movie" mode is set ictrans will wait time  sec‐
262              onds  after displaying each plot before continuing.  time is set
263              with the movie command.  If "movie" mode is not set ictrans will
264              wait for a newline character before advancing to the next frame.
265              plot will report the number of frames  and  the  last  frame  in
266              frames.   Plotting  will  be terminated and ictrans will reenter
267              command mode after the last frame is plotted or upon receiving a
268              interrupt signal, SIGINT.
269
270       [ frames ] Print
271              The  addressed  frames  are  translated  and sent to the current
272              spooling device.  Translation is performed by a spawned transla‐
273              tor.  The  spooler  command  may  be  used  to select a spooling
274              device.  See ncarv_spool(5NCARG).
275
276       quit
277              Terminate the session.
278
279       [ frames ] save [ metafile ]
280              Save the addressed frames to metafile.   If  metafile  does  not
281              exist  then it is created. Filename substitution is performed on
282              metafile.  If metafile is omitted than the last file saved to is
283              used. If frames is omitted than the current frame is used.
284
285       [ frames ] Save [ metafile ]
286              Same  as  the  save  command  except  Save  does not confirm its
287              actions with the user in the case that the file exists.  If  the
288              file  exists  but is not a valid NCGM it is overwritten.  If the
289              file exists and is a valid NCGM it is appended to.
290
291       skip [ number ]
292              Set number of frames to skip over  during  subsequent  plotting.
293              For example, if "skip" is set to 1 and a request is made to plot
294              frames 1 through 10 frames 1, 3, 5, 7, and 9 will be  displayed.
295              With no arguments skip reports its current value. The default is
296              zero.
297
298       spooler [ spooler_alias ]
299              With no arguments the current spooler alias name is reported. If
300              spooler_alias  is a valid alias either defined by the alias com‐
301              mand,  or  in  a  ncarv_spool  configuration  file,  or  by  the
302              NCARV_SPOOL environment variable, then spooler alias becomes the
303              current spooler. Subsequent Print commands will use the  spooler
304              definition    defined    by    the    current    spooler.    See
305              ncarv_spool(5NCARG).
306
307       [ start frame ] start
308              This command defines the first frame in  a  segment  of  frames.
309              start,  together with the stop command, define the boundaries of
310              a segment of metafile frames. When ictrans is in loop  mode  the
311              contents  of this segment are repeatedly displayed.  The default
312              start frame is the first frame in the metafile, 1. If  no  argu‐
313              ments  are  given  start  reports the first frame in the current
314              segment.
315
316       [ stop frame ] stop
317              This command defines the last frame in a segment of frames.  The
318              default  stop frame is the last frame in the metafile, $.  If no
319              arguments are given stop reports the last frame in  the  current
320              segment.
321
322       zoom [ llx [ lly [ urx [ ury ]]]]
323              The  zoom command allows for specification of a workstation win‐
324              dow (in the GKS sense). Four  coordinates  are  specified  which
325              define  a rectangular window which is a subset of the normalized
326              VDC rectangle with corner points (0.0, 0.0) and (1.0, 1,0).  The
327              specified  window  is  then mapped onto the entire viewport. For
328              example
329
330                   ictrans> zoom 0.0 0.0 0.5 0.5
331
332              would result in the lower left quarter of subsequent plots being
333              blown  up  to  fill  the entire display. Specification of such a
334              window may be used for zooming and panning.
335
336              The range with which one may zoom in on a plot may be limited by
337              the integer addressing precision of the device.
338

EXAMPLES

340       The  following  example shows how ictrans might be used in a batch mode
341       to translate a metafile called gmeta and send the translated results of
342       the  entire  file  to  a  spooled device called "imagen" which might be
343       defined in the system ncarv_spool file:
344
345
346              % ictrans -e 'spooler imagen' -e '1,$Print' gmeta
347
348

ENVIRONMENT

350       FONTCAP
351              Default fontcap specifier.
352
353       GRAPHCAP
354              Default output device specifier.
355
356       NCARG_ROOT
357              Path to root of NCAR Graphics installation.
358
359       NCARG_LIB
360              If set this variable contains the path  to  the  installed  NCAR
361              Graphics libraries.  NCARG_LIB overrides NCARG_ROOT.
362
363       NCARG_TMP
364              If  set,  this environment variable contains a directory path to
365              be used for temporary files. On  most  systems  the  default  is
366              /tmp.  On some systems the default is /usr/tmp.
367
368       TMPDIR If  NCARG_TMP is not set this environment variable specifies the
369              directory path for scratch  disk  space.  If  neither  NCARG_TMP
370              TMPDIR is set a site-dependent, hard-coded default is used.
371

FILES

373       $NCARG_ROOT/lib/ncarg/ncarv_spool
374                                   local ictrans spooler config file
375       ~/.ncarv_spool              user's ictrans spooler config file
376

SEE ALSO

378       ctrans(1NCARG), fcaps(1NCARG), gcaps(1NCARG), idt(1NCARG), med(1NCARG),
379       ncarv_spool(5NCARG)
380
381       Hardcopy: NCAR Graphics Fundamentals, UNIX Version
382

CAVEATS

384       Metafile frames written to an existing file via the save  command  will
385       be  subject to the effects of any global "attribute elements" contained
386       within the file.
387
389       Copyright (C) 1987-2009
390       University Corporation for Atmospheric Research
391
392       The use of this Software is governed by a License Agreement.
393
394
395
396NCARG                            January 1993                  ICTRANS(1NCARG)
Impressum