Creates a metafile in memory using Graphics Ports operations.
capi
with-internal-metafile (var &key pane bounds format owner drawing-mode) &body body => metafile
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 the keywords :enhanced , :enhanced-plus and :enhanced-gdi . |
owner⇩ | |
drawing-mode⇩ |
One of the keywords :compatible and :quality . |
body⇩ |
Lisp code. |
metafile⇩ |
A metafile. |
The macro with-internal-metafile
creates a metafile containing records corresponding to the Graphics Ports operations in body that draw to var.
with-internal-metafile
behaves like with-external-metafile except that an object representing the metafile is returned, and no file is created on disk.
var, pane, bounds, format, owner, drawing-mode and body are interpreted as for with-external-metafile except that format cannot have the value :windows
.
Note: GDI+ gives the best quality, so normally that what you want. But you cannot put a GDI+ only metafile on the clipboard, which is why the default is to make a "dual" metafile containing both GDI and GDI+ drawing. If are not going to put the metafile on the clipboard (by calling set-clipboard with format :metafile
) you can use format :enhanced-plus
which is slightly faster and uses less memory.
metafile must be freed after use, by calling free-metafile.
with-internal-metafile
is supported on GTK+ only where Cairo is supported (GTK+ version 2.8 and later).with-internal-metafile
is not implemented on X11/Motif.
(example-edit-file "capi/graphics/metafile")
(example-edit-file "capi/graphics/metafile-rotation")
draw-metafile
free-metafile
port-owner
with-external-metafile
13 Drawing - Graphics Ports
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27