Previous IDL Reference Guide: IDL Direct Graphics Devices Next

The Metafile Display Device

Device Keywords Accepted by the Metafile Device:

CLOSE_FILE, FILENAME, GET_CURRENT_FONT, GET_FONTNAMES, GET_FONTNUM, GLYPH_CACHE, INCHES, INDEX_COLOR, SET_CHARACTER_SIZE, SET_FONT, TRUE_COLOR, TT_FONT, XSIZE, YSIZE

The Windows Metafile Format (WMF) is used by Windows to store vector graphics in order to exchange graphics information between applications. This format is only available on the Windows platforms. To direct graphics to a file in the WMF format, use the SET_PLOT procedure:

SET_PLOT, 'METAFILE'  

This causes IDL to use the Metafile driver for producing graphical output. Once the Metafile driver is enabled via SET_PLOT, the DEVICE procedure is used to control its actions. The default settings are given in the following table:

 

Table A-14: Default Metafile Driver Settings

Table A-14: Default Metafile Driver Settings
Feature
Value
File
idl.emf
Mode
N/A
Horizontal offset
N/A
Vertical offset
N/A
Width
7 in.
Height
5 in.
Resolution
Screen

For example, the following will create a WMF file for a simple plot:

;Create X and Y Axis data  
x=findgen(10)  
y=findgen(10)  
  
;Save current device name  
mydevice=!D.NAME  
  
;Set the device to Metafile  
SET_PLOT, 'METAFILE'  
  
;Name the file to be created  
DEVICE, FILE='test.emf'  
  
;Create the plot  
PLOT, x, y  
  
;Close the device which creates the Metafile  
DEVICE, /CLOSE  
  
;Set the device back to the original  
SET_PLOT, mydevice  

  IDL Online Help (March 06, 2007)