DECdocument
Graphics Editor User's Guide
for Motif


Previous Contents Index


Appendix A
DOCUMENT/GRAPHICS Commands

This appendix describes the following DOCUMENT/GRAPHICS commands:
VMS Command Function
DOCUMENT/GRAPHICS=EDIT Used to access the Graphics Editor.
DOCUMENT/GRAPHICS=RENDER Used to produce output files. Any file type that the Graphics Editor can import can be converted to any file type that it can export. For example, Graphics Editor can import a .XBM file, and covert it to a .SIX file. This command performs the same function as the Export ... menu item on the File menu.
DOCUMENT/GRAPHICS=TEXT_FILTER Used to extract text from a .GRA graphics file, modify the text, and replace it in the .GRA graphics file.
DOCUMENT/GRAPHICS=VIEW Used to preview .GRA graphics files and images.

These commands are entered at the VMS command line.

The following sections explain these commands in detail.

A.1 DOCUMENT/GRAPHICS[=EDIT]

Invokes the Graphics Editor, which lets you create and manipulate object-oriented and bitmap graphics.

FORMAT



DOCUMENT/GRAPHICS=[EDIT] graphics_file

PARAMETER

graphics_file

The name of the graphics file (.GRA) to be displayed when the Graphics Editor is invoked. You can specify only one file name.

DESCRIPTION

The DOCUMENT/GRAPHICS=EDIT command lets you access the Graphics Editor user interface to create and manipulate object-oriented and bitmap graphics.

EXAMPLE


$ DOCUMENT/GRAPHICS LOGO.GRA 

Accesses the Graphics Editor user interface and displays the file LOGO.GRA in a window in the center of the screen.

A.2 DOCUMENT/GRAPHICS=RENDER

Given a .GRA graphics file, produces one or more Bookreader, DDIF, Encapsulated PostScript, sixel, and X bitmap files.

FORMAT



DOCUMENT/GRAPHICS=RENDER /[qualifier [...]] graphics_file

PARAMETER

graphics_file

The name of the input graphics file. You can specify only one input file name at a time. The default output file will have the same name as the file name you specify here, but will have an .EPS file type. You use the /TYPE qualifier to produce Bookreader, DDIF, sixel, and X bitmap output files. You can place the file name before or after the options.

QUALIFIERS

/[NO]BACKGROUND

Specifies whether the graphic's page background color, as set during the interactive editing session, is displayed in the output. This qualifier overrides the background setting in the graphics file. The default is no background.

/CAPTION

Lets you place a caption (with an optional quoted string) in the lower right-hand corner of the figure. The default string is the graphics_file without its extension. The caption is printed in 8-point Helvetica type. Scaling does not affect the caption. The default is no caption.

/COMPLEMENT

Creates the output as the complement of the input. For example, all black dots become white and white dots become black. The default is no complement.

/CROPMARK

Adds crop marks on the border of the graphic. The default is no crop marks.

/FILTER=version

Creates a new metafile in either of the two valid versions, Version 5 or Version 8. This new file has a .FIL appended to the original file name.

If the /FILTER qualifier is specified, no other qualifiers can be specified with the exception of /OUTPUT. The /FILTER qualifier does not create a printable file; therefore, it must be formatted for printing.

/KEEP_ASPECT

Used with the /SIZE qualifier to specify that the aspect ratio of the object (relationship of one dimension to another) is not to be changed when the object is resized. For example, if you have an object that is 3 by 5, and you specify it to be resized to a box that is 8 by 10 keeping the aspect ratio, the object would only be increased to 6 by 10.

/LABEL[="quoted_string"]

Creates a label placed at the top of the output that indicates the output file name, date and time the graphic was processed, width and height, and specified modifications, such as scaling. The optional quoted string adds a title for the label. The default is no label.

/LANDSCAPE

Specifies landscape orientation for the output file. The default orientation is portrait mode.

/LIST=[filename.lis]

Creates a list file (FILENAME.LIS) that shows the DOCUMENT/GRAPHICS=RENDER command and qualifiers used, and label information. The default file name is the same as the input file; that is, if the file ART1.GRA is formatted without specifying a list file name, the list file is ART1.LIS. The default is no list file.

/[NO]MARGIN

Specifies the margin allowance for printing to PostScript devices that cannot print within one-fourth inch of the edges of the paper. The default is margin.

/MIRROR=axis-value

Creates a mirror image of the graphic. Axis-value specifies how the graphic is rotated for the mirror operation. Valid qualifiers are: /MIRROR=horizontal, /MIRROR=vertical and /MIRROR=both. The default is no mirror.

/OUTPUT=filename

Specifies a new file name, file type, directory, device, or node for the output file. Do not specify an output file type if you specified multiple file types with the /TYPE qualifier. You can create the output file on a different node using the qualifier as follows:


 
    DOCUMENT/GRAPHICS=RENDER file.GRA /OUTPUT=node::file.EPS 
 

The default file name is the same name as the input file with an .EPS file type; that is, if the file ART1.GRA is formatted, the default output file is ART1.EPS.

There is a 34-character limit on output file names. This limit does not include the path or the extension.

/PAPER_SIZE=size

Specifies the paper size for which the graphic is to be formatted. Valid sizes are: letter, ledger, legal, executive, A, A3, A4, A5, B, B4, and B5. The default is letter size (8.5 by 11 inches).

/PLACEMENT=location

Specifies the placement of the graph in any of the four corners of the page. This qualifier is useful only for output that is not included in a document. Valid location values are: CENTER, LOWER_LEFT or LL, LOWER_RIGHT or LR, UPPER_LEFT or UL, UPPER_RIGHT or UR. The default is CENTER. Do not use this qualifier for PostScript graphics that are to be included using DECdocument, since DECdocument positions the figure according to the document type.

/ROTATE=(ANGLE=n [,EXCLUDE=filetype])

Specifies that the graphic be rotated by the specified number of degrees. Positive values rotate the graphic counterclockwise; negative values rotate the graphic clockwise.

If multiple file types are specified with the /TYPE qualifier, you can optionally exclude one or more file types from rotation (file types are BRF or Bookreader, DDIF, EPS or PS or PostScript, monosixel, sixel, and XBM or X bitmap).

/SCALE=(X=n,Y=n [,EXCLUDE=filetype])

Specifies that the graphic be enlarged or reduced, by using a percent of the original size. Enter a number for n that is less than 100 to reduce the graphic and greater than 100 to enlarge it. Values are required for both X (horizontal scaling) and Y (vertical scaling), but the X and Y values can be different, allowing you to scale a figure more in one direction than the other.

If multiple file types are specified with the /TYPE qualifier, you can optionally exclude one or more file types from scaling (file types are BRF or Bookreader, DDIF, EPS or PS or PostScript, monosixel, sixel, and XBM or X bitmap).

/SDML=tagtype

Creates an SDML file containing DECdocument tags that can be used to include the graphic in a DECdocument file. The Graphics Editor automatically specifies the correct graphic measurements in the tags and creates SDML tags for each file type specified with the /TYPE qualifier. Valid tag types are:
Tag Type DECdocument Tags Produced
Figure <FIGURE_FILE>(BOOKREADER\file.BRF\2.0)
<FIGURE_FILE>(LN03\file.SIX\2.0)
<FIGURE_FILE>(LINE_PRINTER\SPACE\2.0)
<FIGURE_FILE>(PS\file.EPS\2.0)
Figurewide <FIGURE_FILE>(BOOKREADER\file.BRF\2.0\WIDE)
<FIGURE_FILE>(LN03\file.SIX\2.0\WIDE)
<FIGURE_FILE>(LINE_PRINTER\SPACE\2.0\WIDE)
<FIGURE_FILE>(PS\file.EPS\2.0\WIDE)
Icon <ICON_FILE>(BOOKREADER\file.BRF\2.0)
<ICON_FILE>(LN03\file.SIX\2.0)
<ICON_FILE>(LINE_PRINTER\SPACE\2.0)
<ICON_FILE>(PS\file.EPS\2.0)
Iconright <ICON_FILE>(BOOKREADER\file.BRF\2.0\RIGHT)
<ICON_FILE>(LN03\file.SIX\2.0\RIGHT)
<ICON_FILE>(LINE_PRINTER\SPACE\2.0\RIGHT)
<ICON_FILE>(PS\file.EPS\2.0\RIGHT)

/SIZE=(UNITS=type,X=n,Y=n [,EXCLUDE=filetype])

Resizes a graphic drawing to a specific horizontal and vertical measurement. Valid unit types are inches, picas, and mm (millimeters). The default unit type is inches. Values are required for both X (horizontal dimension) and Y (vertical dimension), but the X and Y values can be different, letting you size a figure more in one direction than the other.

If multiple file types are specified with the /TYPE qualifier, you can optionally exclude one or more file types from scaling (file types are BRF or Bookreader, DDIF, EPS or PS or PostScript, monosixel, sixel, and XBM or X bitmap).

/TEXT_OUTLINE=lineweight

Specifies that text is to be printed in hollow, outlined characters, rather than the usual solid forms. Specify the lineweight of the outline in pixels. A value of 2 is suggested. This option is not supported for the Courier font because it is not an outline font.

/TYPE=filetype[,...]

Produces one or more output file types. Valid output types are BRF or Bookreader, DDIF, EPS or PS or PostScript, monosixel, sixel, and XBM or X bitmap). The default type is EPS. If more than one file type is specified, separate the file types with commas and enclose them in parentheses.

DESCRIPTION

The DECdocument Graphics Rendering Utility reformats .GRA files to produce the following file types:
File Type File Extension
Bookreader (monochrome) .BRF
Graphics metafile .GRA
DDIF (monochrome) .IMG
PostScript¹ .EPS
Sixel (monochrome or color) .SIX
Xbitmap .XBM


¹PostScript output supports translucent images but does not support translucent outline or fill for other types of objects. These are rendered as opague.

The qualifiers on the DOCUMENT/GRAPHICS=RENDER command line are all optional; one or all qualifiers can be used. Unless specified with one of the qualifiers, the following defaults apply to the output:

Note

PostScript output does not reproduce the Xor mode, or the translucent drawing and fill modes. These are reproduced as copy and opaque. PostScript does support translucent images.

EXAMPLES


1.   $ DOCUMENT/GRAPHICS=RENDER LOGO.GRA 

Processes the file LOGO.GRA. By default, the output file is named LOGO.EPS, and the graphic is produced in letter size (8.5 by 11 inches), portrait mode, centered on the page without crop marks, and output full size.


2.   $ DOCUMENT/GRAPHICS=RENDER/TYPE=(EPS,SIX,BRF) LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, but also produces sixel and Bookreader formatted files (LOGO.SIX and LOGO.BRF).


3.   $ DOCUMENT/GRAPHICS=RENDER - 
     _$ /SIZE=(UNITS=picas,X=3,Y=5) LOGO.GRA) 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the output is sized to fit in a 3 by 5 pica area.


4.   $ DOCUMENT/GRAPHICS=RENDER - 
     _$ /SCALE=(X=125,Y=125) LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the output is enlarged to 125 percent of the original size.


5.   $ DOCUMENT/GRAPHICS=RENDER/TYPE=(BRF,SIX,EPS) - 
     _$ /SCALE=(X=75,Y=60,EXCLUDE=BRF) LOGO.GRA) 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the output is reduced to 75 percent in the horizontal direction and 60 percent in the vertical direction for the sixel and PostScript files. The Bookreader file is retained at its original size.


6.   $ DOCUMENT/GRAPHICS=RENDER/TYPE=(SIX,EPS) - 
     _$ /ROTATE=(ANGLE=45,EXCLUDE=PS) LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the output is rotated 45 degrees counterclockwise for the sixel output. The PostScript output is not rotated.


7.   $ DOCUMENT/GRAPHICS=RENDER/TEXT_OUTLINE=2 - 
     _$ /CROPMARK/PLACEMENT=LR LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that all text has an outline of two pixels wide around it, crop marks appear in the four corners, and the output is positioned in the lower right corner.


8.   $ DOCUMENT/GRAPHICS=RENDER/TYPE=(EPS,SIX,BRF) - 
     _$ /SDML=FIGUREWIDE LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the output is also produced in sixel and Bookreader formats and the following file, LOGO.SDML, is created:


 
<COMMENT>(This file was created by the DECdocument Graphics Rendering Utility) 
<COMMENT>(with the following commandline) 
<COMMENT>(DOCUMENT/GRAPHICS=RENDER/TYPE=(EPS,SIX,BRF)/SDML=FIGUREWIDE LOGO.GRA) 
<FIGURE_FILE>(BOOKREADER\LOGO.BRF\2.0\WIDE) 
<FIGURE_FILE>(LN03\LOGO.SIX\2.0\WIDE) 
<FIGURE_FILE>(LINE_PRINTER\SPACE\2.0\WIDE) 
<FIGURE_FILE>(PS\LOGO.EPS\2.0\WIDE) 
 

This file can be included in a DECdocument file to include the graphic when the file is printed. The LN03 and LINE_PRINTER output is produced by default.


9.   $ DOCUMENT/GRAPHICS=RENDER - 
     _$ /LABEL="DIGITAL Logos" - 
     _$ /SCALE=(X=75,Y=75) LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the graphic is scaled 75 percent and the following label appears at the top of the output:


 
 ___ _________________________________________________________________ 
|   |USER    12-JUL-1990  8:57:08     DIGITAL Logos 
|   |DISK:[USER]LOGO.EPS  SCALE=75%  WIDTH=3.5P HEIGHT=2P LETTER/PORTRAIT 
|___|_________________________________________________________________ 
 


10.  $ DOCUMENT/GRAPHICS=RENDER/LIST/LANDSCAPE - 
     _$ LOGO.GRA 

Processes the file LOGO.GRA, with the standard defaults listed in Example 1, except that the output is in landscape format, and the following LOGO.LIS file is produced:


 
* The Original Command Line. 
DOCUMENT/GRAPHICS=RENDER/LIST/LANDSCAPE LOGO.GRA 
 
* The Label Information. 
USER    12-JUL-1990   8:57:08    
DISK:[USER]LOGO.GRA  SCALE=100%  WIDTH=3.5P  HEIGHT=2P LETTER/LANDSCAPE 
 


11.  $ DOCUMENT/GRAPHIC=RENDER/FILTER=V7 - 
     _$ LOGO.GRA 

Processes the file LOGO.GRA and creates a file LOGO_FIL.GRA containing the Version 7 metafile format.

A.3 DOCUMENT/GRAPHICS=TEXT_FILTER

Lets you extract text from and replace text in a .GRA file.

FORMAT



DOCUMENT/GRAPHICS=TEXT_FILTER graphics_file text_file /[qualifier]

PARAMETERS

graphics_file

The graphics file that contains the graphic and the text to be extracted and replaced.

text_file

The text file into which extracted text will be placed so you can modify the text. When you replace the text, this file must contain a modified line of text corresponding to each original line of text.

QUALIFIERS

/[/EXTRACT]

Specifies that text is to be extracted from the graphics file into the text file. This qualifier is the default.

/REPLACE

Specifies that text in the text file is to be replaced in the graphics file.

DESCRIPTION

The DOCUMENT/GRAPHICS=TEXT_FILTER command lets you extract text from a .GRA file, edit the text, and return the text to the .GRA file. This command is most useful for translating text in a graphic drawing.

Use the following precautions with the DOCUMENT/GRAPHICS=TEXT_FILTER command:

EXAMPLES


1.   $ DOCUMENT/GRAPHICS=TEXT_FILTER ART.GRA - 
     _$ ART.TXT 

This command extracts text from the graphics file ART.GRA and places the extracted text into the text file ART.TXT.


2.   $ DOCUMENT/GRAPHICS=TEXT_FILTER ART.GRA - 
     _$ ART.TXT /REPLACE 

This command replaces text from the text file ART.TXT into the graphics file ART.GRA. Before entering this command, you must edit the file ART.TXT and add a replacement line for each text line. If you did not want to modify a text line, enter the text line a second time.

A.4 DOCUMENT/GRAPHICS=VIEW

Lets you preview a .GRA file.

FORMAT



DOCUMENT/GRAPHICS=VIEW graphics_file /[qualifier [...]]

PARAMETER

graphics_file

The name of a .GRA file, or Bookreader, sixel, X bitmap, Encapsulated PostScript, or DDIF bitmap file to be previewed. You can specify only one file name.

QUALIFIERS

/FULL

Displays the same information as the /INFO qaulifier with the addition of the drawing description if there is one.

/INFO

Displays information about the drawing to the terminal. This information is also available by using the pull-down menu.

/INTYPE

Specifies an optional qualifier that informs the program of the input file type. If the file type is not specified, the program attempts to read the input file as all of the input types, one after the other, until it finds a match or runs out of file types. Therefore, using this qualifier speeds the display of the file. Valid input file types are: POSTSCRIPT (EPS)¹, SIXELS, MONOSIXELS, BOOKREADER (BRF), DDIF, XBM (XBITMAP), GRA, and TEXT (TXT). The default is GRA.

/TIMEOUT=number

Specifies an optional timeout period in seconds. This is the approximate amount of time that the graphic will remain visible on the screen before it is removed. If you do not specify a timeout period, dismiss the graphic by selecting the Quit menu item on the Control menu.

/WINDOW_ATTRIBUTES=(TITLE=string, X=n, Y=n)

Specifies an optional title for the window when the graphic is displayed. If you do not specify a title, the file name is displayed in the window title.

Use the X and Y variables to specify a specific position on the screen for the graphic. The default screen position is the middle of the screen.

DESCRIPTION

The DOCUMENT/GRAPHICS=VIEW command lets you preview .GRA files, and sixel, Bookreader, and DDIF images. This command is useful for examining the crop mark settings and to see how long it will take the drawing to be displayed by the Bookreader.

This command displays the specified file in a pop-up window in the center of the screen. You can reposition the window, resize it, or shrink it to an icon like any other DECwindows window.

EXAMPLES


1.   $ DOCUMENT/GRAPHICS=VIEW LOGO.GRA) 

Displays the file LOGO.GRA in a window on your screen. The window is titled LOGO.GRA. You dismiss the window by choosing the Exit menu item on the Control menu.


2.   $ DOCUMENT/GRAPHICS=VIEW LOGO.GRA - 
     _$ /TIMEOUT=5/WINDOW_ATTRIBUTES=(TITLE="Digital Logos") 

Displays the file LOGO.GRA in a window on your screen. The window is titled "Digital Logos" and is displayed for five seconds.

Note

¹ Displaying .EPS files using DOCUMENT/GRAPHICS=VIEW requires that your machine have the Display Postscript extension.


Previous Next Contents Index