blob: c6157b9fecb12abbaa99e5e275741a40d75d4e29 (
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
|
<!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_METAFILE</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>
<body>
<h2>CD_METAFILE - CD Metafile Driver (cdmf.h)</h2>
<p>This driver allows the generation of a CD Metafile, a very simple format that includes calls to functions of the CD
library and provides persistence to its primitives.</p>
<h3>Use</h3>
<p>The file is created by calling function <font face="Courier">
<a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_METAFILE,
Data)</font>. The <font face="Courier">Data</font> parameter is a string that must contain the filename and the canvas
dimensions, in the following format:</p>
<pre>"<i>filename </i>[widthxheight resolution]" or in <em>C use "<strong><tt>%s %gx%g %g</tt></strong>"</em></pre>
<p>Only the parameter <font face="Courier">filename</font> is required. 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 millimeters
(note the lowercase "x" between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for
both dimensions. <font face="Courier">Resolution </font>is the number of pixels per millimeter; its default value is
"3.78 pixels/mm" (96 DPI). <font face="Courier">Width</font>, <font face="Courier">height</font> and
<font face="Courier">resolution</font> are real values.</p>
<p>Any amount of such canvases may exist simultaneously. It is important to note that 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><b>Images - </b>Be careful when saving images in the file, because it uses a text format to store all numbers and
texts of primitives, including images, which significantly increases its size.</p>
<p><b>Extension -</b> Although this is not required, we recommend the extension used for the file to be ".MF".</p>
<h3>Behavior of Functions</h3>
<h4>Coordinate System and Clipping </h4>
<ul>
<li><a href="../func/other.html#cdPlay">
<font face="Courier"><strong>Play</strong></font></a>: implemented. </li>
<li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier">
<strong>UpdateYAxis</strong></font></a>: does nothing.</li>
<li><b>Complex Regions</b>: not supported.</li>
<li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>:
removes all primitives from the picture.</li>
</ul>
<h4>Attributes</h4>
<dir>
<li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>:
uses a size estimator, returning approximate values.</li>
<li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong>
TextSize</strong></font></a>: uses a size estimator, returning approximate values.</li>
</dir>
<h4>Colors</h4>
<ul>
<li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier">
<strong>
GetColorPlanes</strong></font></a>: always returns 24.</li>
</ul>
<h4>Primitives</h4>
<ul>
<li>Floating point primitives are supported.</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>
|