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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
<!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_DGN</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>
<body>
<h2>CD_DGN - MicroStation Design File Driver (cddgn.h)</h2>
<p>This driver allows generating a MicroStation design file. The file name usually has an extension .DGN. The driver
supports only MicroStation version 4.0 or later. The format's copyrights are property of
<a href="http://www.bentley.com" target="_top">Bentley Systems</a>.</p>
<h3>Use</h3>
<p>The file is created and opened by calling function <font face="Courier">
<a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_DGN,
Data)</font>, in which <font face="Courier">Data</font> contains the filename and canvas dimensions. This function
opens the file and writes its header. Then, 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] [resolution] [-f] [-sseedfile]" </em>or in C <em>"<strong><tt>%s %gx%g %g %s</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. Parameter <font face="Courier">-f</font> modifies the polygon
filling's behavior. Just as in MicroStation, you can specify a seed file using parameter <font face="Courier">-s</font>.
<font face="Courier">Width</font>, <font face="Courier">height</font> and <font face="Courier">resolution</font> are
used only by <a href="../func/coordinates.html#cdGetCanvasSize">
<font face="Courier"><strong>cdCanvasGetSize</strong></font></a><font face="Courier"><strong> </strong></font>and in
pixel-millimeter conversion. </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 close the file properly.</p>
<p><b>Images and Colors</b> - The DGN format does not support server images and works with an indexed-color format.
Color quality is limited to 256 colors, and the format uses a uniform palette to convert RGB colors into palette
indices. If you configure a palette, the color conversion process will become slower.</p>
<p><b>Filling</b> - Up to version 5.0, MicroStation presents some limitations for polygon filling. You can disable
filling by means of string "<font face="Courier">-f</font>" in the <font face="Courier">Data</font> parameter. Filled
polygons can only have around 10,000 vertices; if the value is larger, the polygon style changes to closed lines.</p>
<p><b>Seed</b> - In the seed file, several DGN parameters can be defined to be used in the drawing. The library offers
a default seed file, called "SEED2D.DGN". The file's location depends on the environment variable <strong>CDDIR</strong>.</p>
<h3>Behavior of Functions</h3>
<h4>Control</h4>
<ul>
<li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>:
does nothing.</li>
<li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>:
does nothing, returns <font face="Courier">CD_ERROR</font>. </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 (no clipping function is supported), returns <font face="Courier">CD_CLIPOFF</font>.</li>
<li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier">
<strong>UpdateYAxis</strong></font></a>: does nothing. The axis orientation is the same as the CD library.</li>
<li><strong>Transformation Matrix</strong>: not supported.</li>
</ul>
<h4>Primitives</h4>
<ul>
<li><a href="../func/lines.html#cdBegin"><font face="Courier"><strong>Begin</strong></font></a>:
if parameter <strong><tt>CD_CLIP</tt></strong> or <strong><tt>CD_BEZIER</tt></strong> are specified, does nothing.</li>
<li><strong><font face="Courier"><a href="../func/filled.html#cdChord">cdChord</a></font></strong>:
does nothing.</li>
</ul>
<h4>Attributes </h4>
<ul>
<li><a href="../func/filled.html#cdBackOpacity"><font face="Courier"><strong>
BackOpacity</strong></font></a>: does nothing, returns <font face="Courier">CD_OPAQUE</font>.</li>
<li><a href="../func/attributes.html#cdWriteMode"><font face="Courier">
<strong>
WriteMode</strong></font></a>: does nothing, returns <font face="Courier">CD_REPLACE</font>.</li>
<li><a href="../func/filled.html#cdInteriorStyle"><font face="Courier">
<strong>
InteriorStyle</strong></font></a>: does nothing.</li>
<li><a href="../func/filled.html#cdFillMode"><font face="Courier"><strong>
FillMode</strong></font></a>: does nothing.</li>
<li><a href="../func/filled.html#cdLineCap"><font face="Courier"><strong>
LineCap</strong></font></a>: does nothing.</li>
<li><a href="../func/filled.html#cdLineJoin"><font face="Courier"><strong>
LineJoin</strong></font></a>: does nothing.</li>
<li><a href="../func/filled.html#cdHatch"><font face="Courier"><strong>Hatch</strong></font></a>:
does nothing.</li>
<li><a href="../func/filled.html#cdStipple"><font face="Courier"><strong>
Stipple</strong></font></a>: does nothing.</li>
<li><a href="../func/filled.html#cdPattern"><font face="Courier"><strong>
Pattern</strong></font></a>: does nothing.</li>
<li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong>
TextSize</strong></font></a>: returns a bounding box which is usually larger than the text (the computation is based
on the widest character).</li>
<li><a href="../func/text.html#cdTextAlignment"><font face="Courier"><strong>
TextAlignment</strong></font></a>: uses <font face="Courier"><strong>cdTextSize</strong></font>, therefore is not
precise.</li>
<li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>:
See the font mapping table for the equivalence used to map CD fonts into
MicroStation fonts. Styles are not supported.</li>
</ul>
<div align="center">
<center>
<table border="1" cellpadding="5">
<caption valign="top"><font size="4">Font Mapping</font></caption>
<tr>
<th>CD Fonts</th>
<th>MicroStation Font Index</th>
</tr>
<tr>
<td><font face="Courier">CD_SYSTEM</font></td>
<td><font face="Courier">0</font></td>
</tr>
<tr>
<td><font face="Courier">CD_COURIER</font> </td>
<td><font face="Courier">1</font></td>
</tr>
<tr>
<td><font face="Courier">CD_TIMES_ROMAN</font></td>
<td><font face="Courier">2</font></td>
</tr>
<tr>
<td><font face="Courier">CD_HELVETICA</font></td>
<td><font face="Courier">3</font></td>
</tr>
</table>
</center>
</div>
<h4>Colors </h4>
<ul>
<li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier">
<strong>
GetColorPlanes</strong></font></a>: returns 8 (MicroStation uses a palette with 256 values).</li>
<li><a href="../func/attributes.html#cdBackground"><font face="Courier">
<strong>
Background</strong></font></a>: always returns <code><font face="Times New Roman">CD_WHITE</font></code>.</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#cdPutImageRGB"><font face="Courier"><strong>
PutImageRGB</strong></font></a>: considering that the format supports only 256 colors, image quality is quite poor.</li>
<li><a href="../func/client.html#cdPutImageRGBA"><font face="Courier"><strong>
PutImageRGBA</strong></font></a>: alpha is ignored.</li>
<li><a href="../func/client.html#cdPutImageMap"><font face="Courier"><strong>
PutImageMap</strong></font></a>: considering that the format supports only 256 colors, image quality is quite poor.</li>
</ul>
<h4>Server Images </h4>
<ul>
<li>All functions do nothing.</li>
</ul>
</body>
</html>
|