




A variable.
A graphics port, or 
nil
.
A list of four integers, or 
nil
.
One of 
:enhanced
 or 
:windows
.
A pathname or string.
Code containing Graphic Ports operations that draw to var .
The macro 
with-external-metafile
  creates a metafile at the location given by 
pathname
 containing records corresponding to the Graphics Ports operations in 
body
 that draw to 
var
.
This is implemented only in LispWorks for Windows. The metafile is a device-independent format for storing pictures. For more information about metafiles, see the Microsoft documentation.
If 
pane
 is 
nil
, the macro binds 
var
 to a graphics port object representing the metafile. If 
pane
 is non-
nil
 then it must be an instance of output-pane or a subclass. In this case 
var
 is bound to 
pane
, and 
pane
 is modified within the dynamic extent of 
with-external-metafile
 so all drawing operations draw to the metafile instead of 
pane
. This can be useful when reusing existing redisplay code that is written expecting an output-pane. The default value of pane is 
nil
.
bounds
, if non-
nil
, should be a list (
x
 
y
 
width
 
height
) specifying the geometry of the picture in pixels.
If 
format
 is 
:enhanced
, an Enhanced-metafile is created. If 
format
 is 
:windows
, a Windows-metafile is created. The default behavior is to create an Enhanced-metafile.
pathname
 specifies the filename of the metafile. If its 
pathname-type
 is 
nil
, then the file extension 
"EMF"
 is used for an Enhanced-metafile, or 
"WMF"
 for a Windows-metafile.