This driver allows generating a Microsoft Windows Enhanced Metafile, the format used by 32-bit Windows systems to store graphics primitives. Usually, the filename has an extension "*.emf".
The driver works only with the GDI, GDI+ and Cairo base drivers, but you can use it in other platforms without the risk of compilation error. If you attempt to create a canvas in another platform, function cdCreateCanvas will return NULL.
The canvas is created by means of a call to function cdCreateCanvas(CD_EMF, Data), after which other CD functions can be called as usual. Parameter Data has the following format:
"filename widthxheight" or in C "%s %dx%d"
It must include the filename and the canvas' dimensions. The filename must be inside double quotes (") if it has spaces. Width and height are provided in pixels (note the lowercase "x" between them). Resolution (the number of pixels per millimeter) is always the screen resolution.
Any amount of such canvases may exist simultaneously. Function cdCreateCanvas opens the file, and a call to function cdKillCanvas is required to close the file properly.
This driver is very platform-dependent.
For further detail, see the Behavior of Functions in each base driver: GDI. To use this driver with a context plus base driver is necessary to call cdUseContextPlus(1) before creating the canvas, see the GDI+ and Cairo base drivers.
However, it should be noted that some functions behave differently from the basic functions of each platform.
It has been noticed that EMFs, when saved in the Windows 9x environment, is not totally compatible with EMFs saved in the Windows NT environment.
If you intend to use cdCanvasPlay to interpret the EMF, then do not use GDI+ to generate the metafile. GDI+ extensively use internal transformations that will affect the cdCanvasPlay interpretation. Also some interior style will not be correctly interpreted.