Rib
|
Introduction
The first line is not required if you are working on Windows. It will, however,
be necessary to set the output encoding if you are using Linux or OSX.
|
# linux and osx Procedural "RunProgram" ["/usr/bin/tclsh /Users/mk/helper.tcl" ""] [-1 1 -1 1 -1 1] # windows Procedural "RunProgram" ["tclsh G:/mk/helper.tcl" ""] [-1 1 -1 1 -1 1] |
In particular notice the empty string - shown in red. Data to be sent to the helper
script would be written within the quotations. On MacOSX
and, probably, Linux as well, its necessary to specifiy the full path to tclsh (shown
in bold). On windows the path can be omitted. Although, in this example, no additional
data is passed to the helper the renderer itself will always provide a value that
indicates the number of pixels "covered" by the bounding box specified by the numbers
shown in blue.
To use these procedures in the main script it is necessary, at the head of the file, to source the auxillary script. For example, if this script, called myproc.tcl, is on the G drive, the source statement would look like this... source G:/myproc.tcl fconfigure stdout -translation binary
Refer to these docs for examples of implementing a TCL helper script
and a simple RIB file that calls the script. |
© 2005 Malcolm Kesson. All rights reserved.