summaryrefslogtreecommitdiff
path: root/html/en/drv/emf.html
blob: 1f7b462b19179d99a64578eddcd0129bb39fbd50 (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
<!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>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 &quot;*.emf&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>

<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>&quot;filename widthxheight&quot;     </em>or in C <em>&quot;<strong><tt>%s %dx%d</tt></strong>&quot;</em></pre>
  
  <p>It must include the filename and the canvas' dimensions.<font face="Courier">
  </font>The filename must be inside double quotes (&quot;) if it has spaces.<font face="Courier"> 
  Width</font> and <font face="Courier">height</font> are provided in pixels 
  (note the lowercase &quot;x&quot; 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>
<p>To use this driver in Windows using GDI+ is necessary to call 
<font face="Courier"><strong>
  cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> 
before creating the canvas. 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>

<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="win32.html">Microsoft Windows (GDI)</a> 
  or <a href="gdiplus.html">Windows Using GDI+</a> 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.</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&nbsp;</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>