11. UTILITY PROGRAMS

Contents Previous Next Index
This section describes the utility programs included with Robochart.

Batch Printing

The rcprint program lets you print Robochart diagrams from the command line, without starting up the Robochart user interface (or acquiring a license). It uses the same configuration files (named in the same environment variables) as rchart. Rcprint also accepts printing options on the command line, which override any configuration file settings. The options are:
-help
display usage help
-c config-file
load configuration from specified file
-format
select output format: postscript, epsf, hpgl, mif, ascii, image, autohtml,, or html
-page n
only print page n
-page a-b
only print pages a through b
-[no]shadows
[don't] print 3D drop shadows
-[no]color
[don't] print in color
-orientation
select page orientation: landscape, portrait, or auto
-paper size
set paper size as A-E, A0-A5, auto, or widthxheight units
-margin top bottom left right
set margins
-scale n
scale to n% (or fit for fit to page)
-printer name
pipe output to device name
-printer '| command string'
pipe output to command string
-file name
export output to file name
The diagram filename can be given on the command line after all options. Otherwise, diagram data is read from standard input. Note that rcprint sets up an X server connection to access font and color information, even though it doesn't create any windows.

Shape Editing

The rcicon utility is used by Robochart to edit custom shape icons. It can also be run directly, or replaced with an alternate bitmap editor for use within Robochart. If a command argument is supplied, rcicon accepts it as the starting 16x16 bitmap in 64-character packed hex form (as used in the shapedef file). It creates a temporary file in X11 bitmap format, invokes the X bitmap editor on the temporary file, then packs the results back into 64 hex characters, which are written to standard output.

shapeshift can be used to add a new shape definition by transforming an existing shape in one of five ways. Invoke shapeshift with three arguments: the original shape ID (0-255), the new shape ID (0-255), and a transform code, which is one of:


1 to rotate clockwise 90 degrees
2 to rotate 180 degrees
3 to rotate counterclockwise 90 degrees
4 to flip horizontally
5 to flip vertically
If a fourth argument is given, it is taken as the shape filename (typically your configuration file ~/.rchart or the shape definition file shapedef); the old definition is taken from this file and the new definition appended to the file. Otherwise, shapeshift looks for the old definition on standard input, and writes the input plus the new definition to standard output.

Image Capture and Conversion

The snap utility captures a region of the screen into a Sun raster file for use as an image shape in Robochart. Enter a name for the image file, then click on the "Snap Region" button. Move the pointer to the area to be captured, then drag out a "rubber rectangle" with the left mouse button.

ras8to1 converts an 8-bit color Sun raster file (on standard input) to a monochrome raster file (on standard output), suitable for use as an image shape in Robochart. It is used automatically by Robochart if a shape is defined with a color image file.

Font Handling

addsfont adds entries into your Robochart font definition file for scalable fonts. For each scalable font on your system that you want to use in Robochart, use the following command:

addsfont "font-name" PostScript-name [size-list] >> rcfonts
where
font-name
is the X font name (quoted to handle embedded asterisks and spaces)
PostScript-name
is the corresponding PostScript font name for printing
size-list
is a list of point sizes to be created. If not supplied, the default sizes 10, 12, 14, 18, and 24 are generated.
rcfonts
is your Robochart font definition file (named in environment variable RCHT_FONTS when you run Robochart).
rcfntck scans your Robochart font definition file (supplied on the command line, or named in environment variable RCHT_FONTS) looking for formatting errors.

File Conversion

rc_cvt converts diagram documents from earlier Robochart versions to the current format. It reads the old file on standard input, and writes the new file to standard output. rc_cvt is run automatically (as specified by environment variable RCHT_CVT) by Robochart when you ask it to load an old format file.

You can alter the default mapping of shapes when running rc_cvt (manually, or using RCHT_CVT) by specifying one or more command line arguments in the form old=new, where old is an old-format object shape code:


    0 = ellipse       5 = bus              10 = rounded rectangle
    1 = box           6 = shadowed box     11 = vertical double box
    2 = database      7 = left bracket     12 = horizontal double box
    3 = phantom       8 = right bracket    13 = parallelogram
    4 = diamond       9 = hexagon          14 = trapezoid

    15-19 = user-define image shapes

and new is the corresponding new shape ID (0-255).
Contents Next Index