NextPrevUpTopContentsIndex

with-external-metafile

Macro
Summary

Creates a metafile on disk using Graphics Ports operations.

Package

capi

Signature

with-external-metafile ( var &key pane bounds
format pathname ) &body body => nil

Arguments

var

A variable.

pane

A graphics port, or nil .

bounds

A list of four integers. Can also be nil on Microsoft Windows.

format

One of :enhanced or :windows . Used only on Microsoft Windows.

pathname

A pathname or string.

body

Code containing Graphic Ports operations that draw to var .

Description

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 .

On Microsoft Windows the metafile is a device-independent format for storing pictures. For more information about metafiles, see the Microsoft documentation.

On Cocoa the metafile format is PDF as a single page.

with-external-metafile is not implemented on X11/Motif.

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 .

If bounds is nil the metafile size will be computed from the drawing done within the body. This value is not allowed on Cocoa.

If bounds is non- nil (required on Cocoa), it should be a list of integers specifying the coordinate rectangle ( x y width height ) that the metafile contains.

On Microsoft Windows if format is :enhanced , an Enhanced-metafile is created. If format is :windows , a Windows-metafile is created. The default behavior on is to create an Enhanced-metafile.

On Cocoa the metafile format is always PDF as a single page, and the format argument is ignored.

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.

See also

draw-metafile
with-internal-metafile


LispWorks CAPI Reference Manual - 17 Mar 2008

NextPrevUpTopContentsIndex