<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>CD_EMF</title> <link rel="stylesheet" type="text/css" href="../../style.css"> </head> <body> <h2 style="text-align: left">CD_EMF - Enhanced Metafile Driver (cdemf.h)</h2> <p>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".</p> <p>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 <font face="Courier"><strong> cdCreateCanvas</strong></font> will return NULL.</p> <h3>Use</h3> <p>The canvas is created by means of a call to function <font face="Courier"> <a href="../func/init.html#cdCreateCanvas"> <strong>cdCreateCanvas</strong></a>(CD_EMF, Data)</font>, after which other CD functions can be called as usual. Parameter <font face="Courier">Data</font> has the following format:</p> <pre><em>"filename widthxheight" </em>or in C <em>"<strong><tt>%s %dx%d</tt></strong>"</em></pre> <p>It must include the filename and the canvas' dimensions.<font face="Courier"> </font>The filename must be inside double quotes (") if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in pixels (note the lowercase "x" between them). Resolution (the number of pixels per millimeter) is always the screen resolution.</p> <p>Any amount of such canvases may exist simultaneously. Function <font face="Courier"><strong>cdCreateCanvas</strong></font> <b>opens</b> the file, and a call to function <a href="../func/init.html#cdKillCanvas"> <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> <h3>Behavior of Functions</h3> <p>This driver is very platform-dependent. </p> <p>For further detail, see the <b> Behavior of Functions</b> in each base driver: <a href="win32.html">GDI</a>. To use this driver with a context plus base driver is necessary to call <font face="Courier"><strong> cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> before creating the canvas, see the <a href="../drv/gdiplus.html">GDI+</a> and <a href="../drv/cairo.html">Cairo</a> base drivers.</p> <p>However, it should be noted that some functions behave differently from the basic functions of each platform.</p> <p>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.</p> <p>If you intend to use <strong>cdCanvasPlay</strong> to interpret the EMF, then do not use GDI+ to generate the metafile. GDI+ extensively use internal transformations that will affect the <strong> cdCanvasPlay</strong> interpretation. Also some interior style will not be correctly interpreted.</p> <h4>Control Functions</h4> <ul> <li><a href="../func/other.html#cdPlay"> <font face="Courier"><strong>Play</strong></font></a>: different from the basic driver, is implemented. Not implemented using GDI+.</li> <li> <a href="../func/control.html#cdClear"> <font face="Courier"><strong>Clear</strong></font></a>: different from the basic driver, does nothing.</li> </ul> <h4>Client Images </h4> <ul> <li> <a href="../func/client.html#cdGetImageRGB"> <font face="Courier"><strong>GetImageRGB</strong></font></a>: does nothing.</li> </ul> <h4>Server Images</h4> <ul> <li>All functions do nothing.</li> </ul> </body> </html>