Procedure Syntax


Supports: Output Delivery System (ODS)

PROC GIMPORT FILEREF= cgm-fileref external-file

  • FILETYPE=CGM

  • FORMAT=BINARY CHARACTER CLEARTEXT

  • <GOUT=< libref. > output-catalog >;

  • MAP cgm-font TO font ;

  • SCALE X= factor Y= factor X= factor Y= factor ;

  • TRANSLATE X= offset Y= offset X= offset Y= offset ;

PROC GIMPORT Statement

Identifies the input file to be processed , and specifies its file type and format. Optionally specifies an output catalog.

Syntax

PROC GIMPORT FILEREF= cgm-fileref external-file

  • FILETYPE=CGM

  • FORMAT=BINARY CHARACTER CLEARTEXT

  • <GOUT=< libref. > output-catalog >;

Required Arguments

FILEREF= cgm-fileref external-file

  • specifies the computer graphics metafile (CGM) that is input for PROC GIMPORT. Following are the possible values for FILEREF=:

    cgm-fileref

    • a fileref that is associated with the CGM and that has been previously defined using a FILENAME statement or host command.

  • external-file

    • the complete file name of the CGM that you want to import. See the operating system companion for your system for valid values for external-file .

  • Featured in: Example 2 on page 979.

FILETYPE=CGM

  • specifies the type of the input file, that is, the graphics standard to which the file conforms. CGM is the only valid value for the FILETYPE= argument. If the FILETYPE= argument is omitted, an error is issued and the procedure stops.

    Featured in: Example 2 on page 979.

FORMAT=BINARY CHARACTER CLEARTEXT

  • specifies the format of the input file. CGMs can be encoded in one of the following three formats:

    BINARY

    • specifies binary encoding. It is not printable.

  • CHARACTER

    • specifies an encoding suitable for transfer through networks that cannot support binary transfers. It is printable but not readable.

  • CLEARTEXT

    • specifies a text format that can be read using a standard text editor.

  • Most graphics packages use BINARY format. If you specify the wrong format, an "ERROR: Unable to interpret the CGM file" message is issued and the procedure stops. If this occurs, try a different format.

    Featured in: Example 2 on page 979.

Options

GOUT=< libref .> output-catalog

  • specifies the SAS catalog in which to save the graphics output produced by the GIMPORT procedure. If you omit the libref, SAS/GRAPH looks for the catalog in the temporary library called WORK and creates the catalog if it does not exist.

    See also: Storing Graphics Output in SAS Catalogs on page 53.

MAP Statement

Substitutes a SAS/GRAPH software font for a font in the CGM.

Requirements: Submit a separate MAP statement for each CGM font that you want to map.

Tip: You can submit multiple MAP statements with the procedure.

Featured in: Example 2 on page 979.

Syntax

  • MAP cgm-font TO font ;

Required Arguments

cgm-font

  • identifies a font in the CGM. The name of the font must be enclosed in single quotation marks and written exactly as it appears in the font list; cgm-font is case sensitive. Do not include the font list number in cgm-font .

font

  • specifies the SAS/GRAPH font to which the CGM font is mapped. You can specify software fonts or hardware fonts for the destination device. You can also use fonts that are created by the GFONT procedure.

    Note: Remember to specify the libref GFONT0 with a LIBNAME statement if font is a user -generated font.

    By default, the GIMPORT procedure maps all of the CGM fonts to the font specified by the FTEXT= graphics option or, if the FTEXT= graphics option is not used, to the default hardware font, NONE.

Details

If the CGM includes the FONT LIST element, the GIMPORT procedure automatically lists the CGM font names in the log. Use this list to select the fonts for mapping. For example, suppose the font list includes the following entry:

3. Times Roman

If the LOG window displays the message "WARNING: Invalid font index n ," you can map the Times Roman font to the SAS/GRAPH font CENTX with the following statement:

 map 'Times Roman' to centx; 

SCALE Statement

Enlarges or reduces the graphics output by increasing or decreasing the values of the x and y coordinates.

Requirements: You can submit only one SCALE statement.

Tip: You can submit the SCALE statement alone or in conjunction with the TRANSLATE statement, but the SCALE statement is always processed first.

Featured in: Example 2 on page 979.

Syntax

  • SCALE X= factor Y= factor X= factor Y= factor ;

Required Arguments

At least one of the following arguments is required; both may be used and can be listed in either order:

X= factor

  • specifies the enlargement or reduction of the values of the x coordinates. Factor is the number by which these values are multiplied and cannot be less than or equal to 0. By default, X=1. Values less than 1 reduce the size of the graphics output while values greater than 1 increase the size of the graphics output. There is no limit on the size of factor .

Y= factor

  • specifies the enlargement or reduction of the values of the y coordinates. Factor is the number by which these values are multiplied and cannot be less than or equal to 0. By default, Y=1. Values less than 1 reduce the size of the graphics output while values greater than 1 increase the size of the graphics output. There is no limit on the size of factor .

Details

If the shapes in the imported graphics output are too narrow, you can make them wider by increasing the values of the x coordinate. To make the elements in the graphics output twice as wide, specify X=2. To make them half as high, specify Y=.5.

For example, if the values of the x coordinates range from 5 to 50 and if in the SCALE statement the factor for X= is specified as 2, then the values of all of the x coordinates are multiplied by 2 and the range of these values increases . The new range is 10 to 100. And if the values of the y coordinates range from 0 to 25 and if in the SCALE statement the factor for Y= is specified as .5, then the values of all of the y coordinates are multiplied by .5 and the range of these values decreases. The new range is 0 to 12.5.

If you specify a factor that causes the graphics output to exceed the size of the graphics output area, the procedure draws as much of the graphics output as will fit in the available space.

TRANSLATE Statement

Adjusts the location on the display of the graphics output imported by the procedure. Graphics output can be shifted left or right by offsetting the x values or shifted up or down by offsetting the y values.

Requirements: You can submit only one TRANSLATE statement.

Tip: You can submit the TRANSLATE statement alone or in conjunction with the SCALE statement but the SCALE statement is always processed first.

Featured in: Example 2 on page 979.

Syntax

  • TRANSLATE X= offset Y= offset X= offset Y= offset ;

Required Arguments

At least one of the following arguments is required; both may be used and can be listed in either order:

X= offset

  • specifies the number of units in percent of the display area to move the graphics output right (positive numbers) or left (negative numbers ). The value of offset is added to the value of the x coordinate. By default, X=0.

Y= offset

  • specifies the number of units in percent of the display area to move the graphics output up (positive numbers) or down (negative numbers). The value of offset is added to the value of the y coordinate. By default, Y=0.

Details

The TRANSLATE statement adjusts the position of the graphics output without changing its size. The amount of the offset that is specified for X= or Y= in the TRANSLATE statement is the amount that the graphics output is moved.

For example, suppose your imported graphics output is positioned in the upper-left corner of the display. To move it right 10% and down 5%, use the following statement:

 translate x=10 y=-5; 



SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net