summaryrefslogtreecommitdiff
path: root/html/en/drv/wmf.html
blob: aa92c68805e6ce2459e594c6ac3f7853dafd78fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!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 &quot;*.wmf&quot;.</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>&quot;filename widthxheight </em>[resolution]<em>&quot;     </em>or in C <em>&quot;<strong><tt>%s 
    %dx%d</tt></strong> <strong>%g</strong>&quot;</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 &quot;x&quot; 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&nbsp;</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&nbsp;</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>