CD - Canvas Draw

Enhanced Metafile Driver (cdemf.h)

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 in the Microsoft Windows platform, 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.


Use

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 [resolution]" or in C "%s %dx%d %g"

It must include the filename and the canvas' dimensions. Width and height are provided in pixels (note the lowercase "x" between them). Resolution is the number of pixels per millimeter; its default value is the screen's 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.


Behavior of Functions

This driver is greatly platform-dependent. For further detail, see the Behavior of Functions of the Microsoft Windows (GDI) or Windows Using GDI+ platform base drivers. It has been noticed that EMF, when saved in the Windows 95 environment, is not totally compatible with EMF saved in the Windows NT environment.

Control Functions

  • cdPlay: different from the basic driver, is implemented. Not implemented using GDI+.
  • cdClear: different from the basic driver, does nothing.

Client ImagesĀ 

Server Images

  • All functions do nothing.