<!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_WMF</title> <link rel="stylesheet" type="text/css" href="../../style.css"> </head> <body> <h2>CD_WMF - Windows Metafile Driver (cdwmf.h)</h2> <p>This driver allows creating a Microsoft Windows Metafile, the format used by 16-bit Windows systems to store graphics primitives. Usually, the filename has an extension "*.wmf".</p> <p>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 <font face="Courier"><strong> cdCreateCanvas</strong></font> will return NULL.</p> <p><span style="color: #FF0000"><strong>It is recomended to use EMF instead of WMF whenever is possible.</strong></span> </p> <h3>Use</h3> <p>The canvas is created by means of a call to the function <font face="Courier"> <a href="../func/init.html#cdCreateCanvas"> <strong>cdCreateCanvas</strong></a>(CD_WMF, Data)</font>, after which other functions in the CD library can be called as usual. The <font face="Courier"> Data</font> parameter string has the following format:</p> <pre><em>"filename widthxheight </em>[resolution]<em>" </em>or in C <em>"<strong><tt>%s %dx%d</tt></strong> <strong>%g</strong>"</em></pre> <p>The file's name and dimensions are required. <font face="Courier">Width</font> and <font face="Courier">height</font> are provided in pixels (note the lowercase "x" between them). <font face="Courier">Resolution</font> is the number of pixels per millimeter; its default value is the screen resolution.</p> <p>Any amount of such canvases may exist simultaneously. Function <font face="Courier"><strong>cdCreateCanvas</strong></font> creates a memory-based metafile, 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> <p>In fact the driver uses a slightly different format, called Aldus Placeable Metafile (APM). It attaches a small header to the beginning of the file, allowing other applications to import better the metafile contents.</p> <p>This driver is NOT available for the GDI+ base driver.</p> <h3>Behavior of Functions</h3> <p>This driver is greatly platform-dependent. For further detail, see the <b> Behavior of Functions</b> of the <a href="drv/win32.html">Microsoft Windows (GDI)</a> platform. However, it should be noted that some functions behave differently from the basic functions of each platform.</p> <h4>Control </h4> <ul> <li><a href="../func/other.html#cdPlay"> <font face="Courier"><strong>Play</strong></font></a>: different from the basic driver, is implemented.</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>Coordinate System and Clipping </h4> <ul> <li> <a href="../func/clipping.html#cdClip"> <font face="Courier"><strong>Clip</strong></font></a>: does nothing, returns <font face="Courier">CD_CLIPOFF</font>.</li> </ul> <h4>Attributes </h4> <ul> <li> <a href="../func/filled.html#cdStipple"> <font face="Courier"><strong>Stipple</strong></font></a>: is always opaque and smaller than 8x8 pixels.</li> <li> <a href="../func/filled.html#cdPattern"> <font face="Courier"><strong>Pattern</strong></font></a>: does nothing.</li> <li> <a href="../func/lines.html#cdLineWidth"> <font face="Courier"><strong>LineWidth</strong></font></a>: is always 1.</li> <li> <a href="../func/text.html#cdTextAlignment"> <font face="Courier"><strong>TextAlignment</strong></font></a>: <font face="Courier">CD_CENTER/CD_WEST/CD_EAST</font> is saved as <font face="Courier">CD_BASE_CENTER/CD_BASE_LEFT/CD_BASE_RIGHT</font>, but the position error is compensated.</li> <li> <a href="../func/text.html#cdTextOrientation"> <font face="Courier"><strong>TextOrientation</strong></font></a>: 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> <li> <a href="../func/client.html#cdPutImageRGBA"> <font face="Courier"><strong>PutImageRGBA</strong></font></a>: the alpha component is ignored.</li> </ul> <h4>Server Images</h4> <ul> <li>All functions do nothing.</li> </ul> </body> </html>