Automatic wiki import (Sat Mar 8 21:51:23 UTC 2014)
[geda-gaf.git] / docs / wiki / geda-file_format_spec.html
blob88641ee97fab7ad39f7c8a8741791fd8d5cf3aad
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
5 <title></title>
6 <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
7 <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
8 <link rel="stylesheet" media="print" type="text/css" href="./print.css" />
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 </head>
12 <body>
15 <h1 class="sectionedit1776"><a name="geda_gaf_file_format_document" id="geda_gaf_file_format_document">gEDA/gaf File Format Document</a></h1>
16 <div class="level1">
18 <p>
19 by: Ales V. Hvezda, ahvezda@geda.seul.org
20 </p>
22 <p>
23 This document is released under <a href="http://www.gnu.org/copyleft/fdl.html" class="urlextern" title="http://www.gnu.org/copyleft/fdl.html" rel="nofollow">GFDL</a>
24 </p>
26 <p>
27 December 31st, 2003
28 </p>
30 </div>
31 <!-- EDIT1776 SECTION "gEDA/gaf File Format Document" [1-187] -->
32 <h2 class="sectionedit1777"><a name="overview" id="overview">Overview</a></h2>
33 <div class="level2">
35 <p>
36 This file is the official documentation for the file formats in gEDA/gaf (gschem And Friends). The primary file format used in gEDA/gaf is the schematic/symbol format. Files which end with .sch or .sym are schematics or symbol files. Until there is another file type in gEDA/gaf, then this document will only cover the symbol/schematic file format.<br/>
38 This file format document is current as of gEDA/gaf version 20040111. This document covers file format version 1 and 2.<br/>
40 Note, this file format and any other file formats associated with gEDA are placed under the General Public License (<acronym title="GNU General Public License">GPL</acronym>) version 2.0. The gEDA/gaf symbol and schematic file format is Copyright (C) 1998-2004 Ales Hvezda.
41 </p>
43 </div>
44 <!-- EDIT1777 SECTION "Overview" [188-902] -->
45 <h2 class="sectionedit1778"><a name="coordinate_space" id="coordinate_space">Coordinate Space</a></h2>
46 <div class="level2">
48 <p>
49 All coordinates are in mils (1/1000 of an inch). This is an arbitrary decision. Remember in there is no concept of physical lengths/dimensions in schematics and symbols (for schematic capture only).<br/>
51 </p>
52 <ul>
53 <li class="level1"><div class="li"> Origin is in lower left hand corner.</div>
54 </li>
55 <li class="level1"><div class="li"> The size of the coordinate space is unlimited, but it is recommended that all objects stay within (120.0, 90.0) (x, y inches).</div>
56 </li>
57 <li class="level1"><div class="li"> It is generally advisable to have positive x and y coordinates, however, negative coordinates work too, but not recommended.</div>
58 </li>
59 </ul>
61 <p>
62 The following figure shows how the coordinate space is setup:
63 </p>
64 <div class="table sectionedit1779"><table class="inline">
65 <tr class="row0">
66 <td class="col0"><a href="media/geda/coordinatespace.jpg" class="media" target="_blank" title="geda:coordinatespace.jpg"><img src="media/geda/coordinatespace.jpg" class="mediaright" title=":geda:coordinatespace.jpg " alt=":geda:coordinatespace.jpg " /></a></td>
67 </tr>
68 </table></div>
69 <!-- EDIT1779 TABLE [1498-1557] -->
70 <p>
71 X axis increases going to the right. Y axis increase going up. Coordinate system is landscape and corresponds to a sheet of paper turned on its side.
72 </p>
74 </div>
75 <!-- EDIT1778 SECTION "Coordinate Space" [903-1709] -->
76 <h2 class="sectionedit1780"><a name="filenames" id="filenames">Filenames</a></h2>
77 <div class="level2">
79 <p>
80 Symbols end in .sym. The only symbol filename convention that is used in gEDA/gaf is that if there are multiple instances of a symbol with the same name (like a 7400), then a -1, -2, -3, … -N suffix is added to the end of the filename. Example: 7400-1.sym, 7400-2.sym, 7400-3.sym…<br/>
82 Schematics end in .sch. There used to be a schematic filename convention (adding a -1 .. -N to the end of the basename), but this convention is now obsolete. Schematic filenames can be anything that makes sense to the creator.
83 </p>
85 </div>
86 <!-- EDIT1780 SECTION "Filenames" [1710-2246] -->
87 <h2 class="sectionedit1781"><a name="object_types" id="object_types">Object types</a></h2>
88 <div class="level2">
90 <p>
91 A schematic/symbol file for gEDA/gaf consists of:
92 </p>
93 <ul>
94 <li class="level1"><div class="li"> A version (v) as the first item in the file. This is required.</div>
95 </li>
96 <li class="level1"><div class="li"> Any number of objects and the correct data. Objects are specified by an “object type”</div>
97 </li>
98 <li class="level1"><div class="li"> Most objects are a single line, however text objects are two lines long.</div>
99 </li>
100 <li class="level1"><div class="li"> No blank lines at the end of the file (these are ignored by the tools)</div>
101 </li>
102 <li class="level1"><div class="li"> For all enumerated types in the gEDA/gaf file formats, the field takes on the numeric value.</div>
103 </li>
104 </ul>
107 The “object type” id is a single letter and this id must start in the first column. The object type id is case sensitive.<br/>
109 The schematic and symbol files share the same file layout. A symbol is nothing more than a collection of primitive objects (lines, boxes, circles, arcs, text, and pins). A schematic is a collection of symbols (components), nets, and buses.<br/>
111 The following sections describe the specifics of each recognized object type. Each section has the name of the object, which file type (sch/sym) the object can appear in, the format of the data, a description of each individual field, details and caveats of the fields, and finally an example with description.<br/>
113 For information on the color index (which is used in practically all objects), see the Color section.
114 </p>
116 </div>
117 <!-- EDIT1781 SECTION "Object types" [2247-3519] -->
118 <h3 class="sectionedit1782"><a name="version" id="version">version</a></h3>
119 <div class="level3">
122 Valid in: Schematic and Symbol files<br/>
124 <strong><code>type version fileformat_version</code></strong>
125 </p>
126 <div class="table sectionedit1783"><table class="inline">
127 <tr class="row0">
128 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
129 </tr>
130 <tr class="row1">
131 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">v</td>
132 </tr>
133 <tr class="row2">
134 <td class="col0 rightalign"> 1 </td><td class="col1">version</td><td class="col2">int</td><td class="col3">version of gEDA/gaf that wrote this file</td>
135 </tr>
136 <tr class="row3">
137 <td class="col0 rightalign"> 2 </td><td class="col1">fileformat_version</td><td class="col2">int</td><td class="col3">gEDA/gaf file format version number</td>
138 </tr>
139 </table></div>
140 <!-- EDIT1783 TABLE [3618-3797] --><ul>
141 <li class="level1"><div class="li"> The type is a lower case “v” (as in Victor).</div>
142 </li>
143 <li class="level1"><div class="li"> This object must be in every file used or created by the gEDA/gaf tools.</div>
144 </li>
145 <li class="level1"><div class="li"> The format of the first version field is YYYYMMDD.</div>
146 </li>
147 <li class="level1"><div class="li"> The version number is not an arbitrary timestamp. Do not make up a version number and expect the tools to behave properly.</div>
148 </li>
149 <li class="level1"><div class="li"> The “version of gEDA/gaf that wrote this file” was used in all versions of gEDA/gaf up to 20030921 as the file formats version. This field should no longer be used to determine the file format. It is used for information purposes only now.</div>
150 </li>
151 <li class="level1"><div class="li"> Starting at and after gEDA/gaf version 20031004, the fileformat version field is used to determine the file format version. All file format code should key off of this field.</div>
152 </li>
153 <li class="level1"><div class="li"> fileformat version increases when the file format changes.</div>
154 </li>
155 <li class="level1"><div class="li"> The starting point for fileformat version was 1. The current fileformat is 2.</div>
156 </li>
157 <li class="level1"><div class="li"> fileformat version is just an integer with no minor number.</div>
158 </li>
159 <li class="level1"><div class="li"> Development versions include: 19990601, 19990610, 19990705, 19990829, 19990919, 19991011, 20000220, 20000704, 20001006, 20001217, 20010304, 20010708, 20010722, 20020209, 20020414, 20020527, 20020825, 20021103, 20030223, 20030525, 20030901, 20040111, 20040710, 20041228, 20050313, 20050820, 20060123, 20060824, 20060906, 20061020, 20070216, 20070705, 20070708, 20070818, 20071229, 20080110, 20080127, 20080706, 20081220, 20081221, 20090328, 20090829, 20090830, 20110116, 20110619, 20111231</div>
160 </li>
161 <li class="level1"><div class="li"> Stable versions include: 20070526, 20070626, 20070902, 20071231, 20080127, 20080929, 20081220, 20081231, 20091004, 20100214, 20110115</div>
162 </li>
163 <li class="level1"><div class="li"> <acronym title="Concurrent Versions System">CVS</acronym> or test versions (should not be used): 20030921, 20031004, 20031019, 20031231, 20050814</div>
164 </li>
165 <li class="level1"><div class="li"> Keep in mind that each of the above listed versions might have had file format variations. This document only covers the last version&#039;s file format.</div>
166 </li>
167 </ul>
170 Example:<br/>
172 </p>
173 <pre class="code">v 20040111 1</pre>
175 </div>
176 <!-- EDIT1782 SECTION "version" [3520-5657] -->
177 <h3 class="sectionedit1784"><a name="line" id="line">line</a></h3>
178 <div class="level3">
181 Valid in: Schematic and Symbol files<br/>
183 <strong><code>type x1 y1 x2 y2 color width capstyle dashstyle dashlength dashspace</code></strong>
184 </p>
185 <div class="table sectionedit1785"><table class="inline">
186 <tr class="row0">
187 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
188 </tr>
189 <tr class="row1">
190 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">L</td>
191 </tr>
192 <tr class="row2">
193 <td class="col0 rightalign"> 1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
194 </tr>
195 <tr class="row3">
196 <td class="col0 rightalign"> 2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
197 </tr>
198 <tr class="row4">
199 <td class="col0 rightalign"> 3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
200 </tr>
201 <tr class="row5">
202 <td class="col0 rightalign"> 4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
203 </tr>
204 <tr class="row6">
205 <td class="col0 rightalign"> 5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
206 </tr>
207 <tr class="row7">
208 <td class="col0 rightalign"> 6 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of line</td>
209 </tr>
210 <tr class="row8">
211 <td class="col0 rightalign"> 7 </td><td class="col1">capstyle</td><td class="col2">int</td><td class="col3">Line cap style</td>
212 </tr>
213 <tr class="row9">
214 <td class="col0 rightalign"> 8 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
215 </tr>
216 <tr class="row10">
217 <td class="col0 rightalign"> 9 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
218 </tr>
219 <tr class="row11">
220 <td class="col0 rightalign"> 10 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
221 </tr>
222 </table></div>
223 <!-- EDIT1785 TABLE [5790-6239] --><ul>
224 <li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
225 <ul>
226 <li class="level2"><div class="li"> END NONE = 0</div>
227 </li>
228 <li class="level2"><div class="li"> END SQUARE = 1</div>
229 </li>
230 <li class="level2"><div class="li"> END ROUND = 2</div>
231 </li>
232 </ul>
233 </li>
234 <li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
235 <ul>
236 <li class="level2"><div class="li"> TYPE SOLID = 0</div>
237 </li>
238 <li class="level2"><div class="li"> TYPE DOTTED = 1</div>
239 </li>
240 <li class="level2"><div class="li"> TYPE DASHED = 2</div>
241 </li>
242 <li class="level2"><div class="li"> TYPE CENTER = 3</div>
243 </li>
244 <li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
245 </li>
246 </ul>
247 </li>
248 <li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
249 </li>
250 <li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
251 </li>
252 </ul>
255 Example:<br/>
257 </p>
258 <pre class="code">L 23000 69000 28000 69000 3 40 0 1 -1 75</pre>
261 A line segment from (23000, 69000) to (28000, 69000) with color index 3, 40 mils thick, no cap, dotted line style, and with a spacing of 75 mils in between each dot.
262 </p>
264 </div>
265 <!-- EDIT1784 SECTION "line" [5658-6973] -->
266 <h3 class="sectionedit1786"><a name="picture" id="picture">picture</a></h3>
267 <div class="level3">
270 Valid in: Schematic and Symbol files<br/>
272 <strong><code>type x1 y1 width height angle mirrored embedded<br/>
274 filename<br/>
276 [encoded picture data<br/>
278 encoded picture end]</code></strong>
279 </p>
280 <div class="table sectionedit1787"><table class="inline">
281 <tr class="row0">
282 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
283 </tr>
284 <tr class="row1">
285 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">G</td>
286 </tr>
287 <tr class="row2">
288 <td class="col0 rightalign"> 1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Lower left X coordinate</td>
289 </tr>
290 <tr class="row3">
291 <td class="col0 rightalign"> 2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Lower left Y coordinate</td>
292 </tr>
293 <tr class="row4">
294 <td class="col0 rightalign"> 3 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of the picture</td>
295 </tr>
296 <tr class="row5">
297 <td class="col0 rightalign"> 4 </td><td class="col1">height</td><td class="col2">int/mils</td><td class="col3">Height of the picture</td>
298 </tr>
299 <tr class="row6">
300 <td class="col0 rightalign"> 5 </td><td class="col1">angle</td><td class="col2">int/degrees</td><td class="col3">Angle of the picture</td>
301 </tr>
302 <tr class="row7">
303 <td class="col0 rightalign"> 6 </td><td class="col1">mirrored</td><td class="col2">char</td><td class="col3">Mirrored or normal picture</td>
304 </tr>
305 <tr class="row8">
306 <td class="col0 rightalign"> 7 </td><td class="col1">embedded</td><td class="col2">char</td><td class="col3">Embedded or link to the picture file</td>
307 </tr>
308 <tr class="row9">
309 <td class="col0 rightalign"> 8 </td><td class="col1">filename</td><td class="col2">string</td><td class="col3">path and filename of a not embedded picture</td>
310 </tr>
311 <tr class="row10">
312 <td class="col0 rightalign"> 9 </td><td class="col1">encoded picture data</td><td class="col2">string</td><td class="col3">Serialized picture encoded using base64</td>
313 </tr>
314 <tr class="row11">
315 <td class="col0 rightalign"> 10 </td><td class="col1">encoded picture end</td><td class="col2">string</td><td class="col3">A line containing only a dot character</td>
316 </tr>
317 </table></div>
318 <!-- EDIT1787 TABLE [7146-7749] --><ul>
319 <li class="level1"><div class="li"> This object is a picture object. The first line contains all the picture parameters, and the second line is the path and filename of the picture. The filename is not used if the picture is embedded.</div>
320 </li>
321 <li class="level1"><div class="li"> The angle of the picture can only take on one of the following values: 0, 90, 180, 270.</div>
322 </li>
323 <li class="level1"><div class="li"> The mirrored field is an enumerated type:</div>
324 <ul>
325 <li class="level2"><div class="li"> NOT MIRRORED = 0</div>
326 </li>
327 <li class="level2"><div class="li"> MIRRORED = 1</div>
328 </li>
329 </ul>
330 </li>
331 <li class="level1"><div class="li"> The embedded field is an enumerated type:</div>
332 <ul>
333 <li class="level2"><div class="li"> NOT EMBEDDED = 0</div>
334 </li>
335 <li class="level2"><div class="li"> EMBEDDED = 1 (not yet supported)</div>
336 </li>
337 </ul>
338 </li>
339 <li class="level1"><div class="li"> The encoded picture and encoded picture end fields are only in the file if the picture is embedded in the schematic:</div>
340 <ul>
341 <li class="level2"><div class="li"> encoded picture data: This is a multiple line field. The picture is serialized and then encoded using base64. This way the encoded data uses only printable characters. This field is the result of these two operations.</div>
342 </li>
343 <li class="level2"><div class="li"> encoded picture end : A line containing only a single dot &#039;.&#039; character marks the end of the encoded picture data.</div>
344 </li>
345 </ul>
346 </li>
347 </ul>
350 Example:<br/>
352 </p>
353 <pre class="code">G 16900 35800 1400 2175 0 0 0
354 ../bitmaps/logo.jpg</pre>
357 A picture object with the lower left corner at (16900, 35800). The width of the image is 1400 mils, and its height is 2175 mils. The picture rotation is 0 degrees and the picture is not mirrored, neither embedded.<br/>
359 The picture path and filename is showed in the second line.<br/>
361 Example:<br/>
363 </p>
364 <pre class="code">G 16900 35800 1400 2175 0 0 1
365 ../bitmaps/logo.jpg
366 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
367 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
368 .</pre>
371 A picture object with the lower left corner at (16900, 35800). The width of the image is 1400 mils, and its height is 2175 mils.<br/>
373 The picture rotation is 0 degrees, it is not mirrored, and it is embedded.<br/>
375 The picture path and filename is showed in the second line. Since this is an embedded picture, the filename and path are not used.<br/>
377 The encoded picture data is only an example (it is not real data). The last line containing a single dot &#039;.&#039; character marks the end of the encoded picture data.
378 </p>
380 </div>
381 <!-- EDIT1786 SECTION "picture" [6974-9750] -->
382 <h3 class="sectionedit1788"><a name="box" id="box">box</a></h3>
383 <div class="level3">
386 Valid in: Schematic and Symbol files<br/>
388 <strong><code>type x y width height color width capstyle dashstyle dashlength dashspace
389 filltype fillwidth angle1 pitch1 angle2 pitch2</code></strong>
390 </p>
391 <div class="table sectionedit1789"><table class="inline">
392 <tr class="row0">
393 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
394 </tr>
395 <tr class="row1">
396 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">B</td>
397 </tr>
398 <tr class="row2">
399 <td class="col0 rightalign"> 1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Lower left hand X coordinate</td>
400 </tr>
401 <tr class="row3">
402 <td class="col0 rightalign"> 2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Lower left hand Y coordinate</td>
403 </tr>
404 <tr class="row4">
405 <td class="col0 rightalign"> 3 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of the box (x direction)</td>
406 </tr>
407 <tr class="row5">
408 <td class="col0 rightalign"> 4 </td><td class="col1">height</td><td class="col2">int/mils</td><td class="col3">Height of the box (y direction)</td>
409 </tr>
410 <tr class="row6">
411 <td class="col0 rightalign"> 5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
412 </tr>
413 <tr class="row7">
414 <td class="col0 rightalign"> 6 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of lines</td>
415 </tr>
416 <tr class="row8">
417 <td class="col0 rightalign"> 7 </td><td class="col1">capstyle</td><td class="col2">int/mils</td><td class="col3">Line cap style</td>
418 </tr>
419 <tr class="row9">
420 <td class="col0 rightalign"> 8 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
421 </tr>
422 <tr class="row10">
423 <td class="col0 rightalign"> 9 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
424 </tr>
425 <tr class="row11">
426 <td class="col0 rightalign"> 10 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
427 </tr>
428 <tr class="row12">
429 <td class="col0 rightalign"> 11 </td><td class="col1">filltype</td><td class="col2">int</td><td class="col3">Type of fill</td>
430 </tr>
431 <tr class="row13">
432 <td class="col0 rightalign"> 12 </td><td class="col1">fillwidth</td><td class="col2">int/mils</td><td class="col3">Width of the fill lines</td>
433 </tr>
434 <tr class="row14">
435 <td class="col0 rightalign"> 13 </td><td class="col1">angle1</td><td class="col2">int/degrees</td><td class="col3">First angle of fill</td>
436 </tr>
437 <tr class="row15">
438 <td class="col0 rightalign"> 14 </td><td class="col1">pitch1</td><td class="col2">int/mils</td><td class="col3">First pitch/spacing of fill</td>
439 </tr>
440 <tr class="row16">
441 <td class="col0 rightalign"> 15 </td><td class="col1">angle2</td><td class="col2">int/degrees</td><td class="col3">Second angle of fill</td>
442 </tr>
443 <tr class="row17">
444 <td class="col0 rightalign"> 16 </td><td class="col1">pitch2</td><td class="col2">int/mils</td><td class="col3">Second pitch/spacing of fill</td>
445 </tr>
446 </table></div>
447 <!-- EDIT1789 TABLE [9934-10722] --><ul>
448 <li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
449 <ul>
450 <li class="level2"><div class="li"> END NONE = 0</div>
451 </li>
452 <li class="level2"><div class="li"> END SQUARE = 1</div>
453 </li>
454 <li class="level2"><div class="li"> END ROUND = 2</div>
455 </li>
456 </ul>
457 </li>
458 <li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
459 <ul>
460 <li class="level2"><div class="li"> TYPE SOLID = 0</div>
461 </li>
462 <li class="level2"><div class="li"> TYPE DOTTED = 1</div>
463 </li>
464 <li class="level2"><div class="li"> TYPE DASHED = 2</div>
465 </li>
466 <li class="level2"><div class="li"> TYPE CENTER = 3</div>
467 </li>
468 <li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
469 </li>
470 </ul>
471 </li>
472 <li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
473 </li>
474 <li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
475 </li>
476 <li class="level1"><div class="li"> The filltype parameter is an enumerated type:</div>
477 <ul>
478 <li class="level2"><div class="li"> FILLING HOLLOW = 0</div>
479 </li>
480 <li class="level2"><div class="li"> FILLING FILL = 1</div>
481 </li>
482 <li class="level2"><div class="li"> FILLING MESH = 2</div>
483 </li>
484 <li class="level2"><div class="li"> FILLING HATCH = 3</div>
485 </li>
486 <li class="level2"><div class="li"> FILLING VOID = 4 unused</div>
487 </li>
488 </ul>
489 </li>
490 <li class="level1"><div class="li"> If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.</div>
491 </li>
492 <li class="level1"><div class="li"> The fill type FILLING FILL is a solid color fill.</div>
493 </li>
494 <li class="level1"><div class="li"> The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.</div>
495 </li>
496 <li class="level1"><div class="li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.</div>
497 </li>
498 </ul>
501 Example:<br/>
503 </p>
504 <pre class="code">B 33000 67300 2000 2000 3 60 0 2 75 50 0 -1 -1 -1 -1 -1</pre>
507 A box with the lower left hand corner at (33000, 67300) and a width and height of (2000, 2000), color index 3, line width of 60 mils, no cap, dashed line type, dash length of 75 mils, dash spacing of 50 mils, no fill, rest parameters unset.
508 </p>
510 </div>
511 <!-- EDIT1788 SECTION "box" [9751-12065] -->
512 <h3 class="sectionedit1790"><a name="circle" id="circle">circle</a></h3>
513 <div class="level3">
516 Valid in: Schematic and Symbol files<br/>
518 <strong><code>type x y radius color width capstyle dashstyle dashlength dashspace
519 filltype fillwidth angle1 pitch1 angle2 pitch2</code></strong>
520 </p>
521 <div class="table sectionedit1791"><table class="inline">
522 <tr class="row0">
523 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
524 </tr>
525 <tr class="row1">
526 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">V</td>
527 </tr>
528 <tr class="row2">
529 <td class="col0 rightalign"> 1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Center X coordinate</td>
530 </tr>
531 <tr class="row3">
532 <td class="col0 rightalign"> 2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Center Y coordinate</td>
533 </tr>
534 <tr class="row4">
535 <td class="col0 rightalign"> 3 </td><td class="col1">radius</td><td class="col2">int/mils</td><td class="col3">Radius of the circle</td>
536 </tr>
537 <tr class="row5">
538 <td class="col0 rightalign"> 4 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
539 </tr>
540 <tr class="row6">
541 <td class="col0 rightalign"> 5 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of circle line</td>
542 </tr>
543 <tr class="row7">
544 <td class="col0 rightalign"> 6 </td><td class="col1">capstyle</td><td class="col2">int/mils</td><td class="col3">0 unused</td>
545 </tr>
546 <tr class="row8">
547 <td class="col0 rightalign"> 7 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
548 </tr>
549 <tr class="row9">
550 <td class="col0 rightalign"> 8 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
551 </tr>
552 <tr class="row10">
553 <td class="col0 rightalign"> 9 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
554 </tr>
555 <tr class="row11">
556 <td class="col0 rightalign"> 10 </td><td class="col1">filltype</td><td class="col2">int</td><td class="col3">Type of fill</td>
557 </tr>
558 <tr class="row12">
559 <td class="col0 rightalign"> 11 </td><td class="col1">fillwidth</td><td class="col2">int/mils</td><td class="col3">Width of the fill lines</td>
560 </tr>
561 <tr class="row13">
562 <td class="col0 rightalign"> 12 </td><td class="col1">angle1</td><td class="col2">int/degrees</td><td class="col3">First angle of fill</td>
563 </tr>
564 <tr class="row14">
565 <td class="col0 rightalign"> 13 </td><td class="col1">pitch1</td><td class="col2">int/mils</td><td class="col3">First pitch/spacing of fill</td>
566 </tr>
567 <tr class="row15">
568 <td class="col0 rightalign"> 14 </td><td class="col1">angle2</td><td class="col2">int/degrees</td><td class="col3">Second angle of fill</td>
569 </tr>
570 <tr class="row16">
571 <td class="col0 rightalign"> 15 </td><td class="col1">pitch2</td><td class="col2">int/mils</td><td class="col3">Second pitch/spacing of fill</td>
572 </tr>
573 </table></div>
574 <!-- EDIT1791 TABLE [12246-12951] --><ul>
575 <li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
576 <ul>
577 <li class="level2"><div class="li"> TYPE SOLID = 0</div>
578 </li>
579 <li class="level2"><div class="li"> TYPE DOTTED = 1</div>
580 </li>
581 <li class="level2"><div class="li"> TYPE DASHED = 2</div>
582 </li>
583 <li class="level2"><div class="li"> TYPE CENTER = 3</div>
584 </li>
585 <li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
586 </li>
587 </ul>
588 </li>
589 <li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
590 </li>
591 <li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
592 </li>
593 <li class="level1"><div class="li"> The filltype parameter is an enumerated type:</div>
594 <ul>
595 <li class="level2"><div class="li"> FILLING HOLLOW = 0</div>
596 </li>
597 <li class="level2"><div class="li"> FILLING FILL = 1</div>
598 </li>
599 <li class="level2"><div class="li"> FILLING MESH = 2</div>
600 </li>
601 <li class="level2"><div class="li"> FILLING HATCH = 3</div>
602 </li>
603 <li class="level2"><div class="li"> FILLING VOID = 4 unused</div>
604 </li>
605 </ul>
606 </li>
607 <li class="level1"><div class="li"> If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.</div>
608 </li>
609 <li class="level1"><div class="li"> The fill type FILLING FILL is a solid color fill.</div>
610 </li>
611 <li class="level1"><div class="li"> The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.</div>
612 </li>
613 <li class="level1"><div class="li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.</div>
614 </li>
615 </ul>
618 Example:<br/>
620 </p>
621 <pre class="code">V 38000 67000 900 3 0 0 2 75 50 2 10 20 30 90 50</pre>
624 A circle with the center at (38000, 67000) and a radius of 900 mils, color index 3, line width of 0 mils (smallest size), no cap, dashed line type, dash length of 75 mils, dash spacing of 50 mils, mesh fill, 10 mils thick mesh lines, first mesh line: 20 degrees, with a spacing of 30 mils, second mesh line: 90 degrees, with a spacing of 50 mils.
625 </p>
627 </div>
628 <!-- EDIT1790 SECTION "circle" [12066-14293] -->
629 <h3 class="sectionedit1792"><a name="arc" id="arc">arc</a></h3>
630 <div class="level3">
633 Valid in: Schematic and Symbol files<br/>
635 <strong><code>type x y radius startangle sweepangle color width capstyle dashstyle
636 dashlength dashspace</code></strong>
637 </p>
638 <div class="table sectionedit1793"><table class="inline">
639 <tr class="row0">
640 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
641 </tr>
642 <tr class="row1">
643 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">A</td>
644 </tr>
645 <tr class="row2">
646 <td class="col0 rightalign"> 1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Center X coordinate</td>
647 </tr>
648 <tr class="row3">
649 <td class="col0 rightalign"> 2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Center Y coordinate</td>
650 </tr>
651 <tr class="row4">
652 <td class="col0 rightalign"> 3 </td><td class="col1">radius</td><td class="col2">int/mils</td><td class="col3">Radius of the arc</td>
653 </tr>
654 <tr class="row5">
655 <td class="col0 rightalign"> 4 </td><td class="col1">startangle</td><td class="col2">int/degrees</td><td class="col3">Starting angle of the arc</td>
656 </tr>
657 <tr class="row6">
658 <td class="col0 rightalign"> 5 </td><td class="col1">sweepangle</td><td class="col2">int/degrees</td><td class="col3">Amount the arc sweeps</td>
659 </tr>
660 <tr class="row7">
661 <td class="col0 rightalign"> 6 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
662 </tr>
663 <tr class="row8">
664 <td class="col0 rightalign"> 7 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of circle line</td>
665 </tr>
666 <tr class="row9">
667 <td class="col0 rightalign"> 8 </td><td class="col1">capstyle</td><td class="col2">int</td><td class="col3">Cap style</td>
668 </tr>
669 <tr class="row10">
670 <td class="col0 rightalign"> 9 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
671 </tr>
672 <tr class="row11">
673 <td class="col0 rightalign"> 10 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
674 </tr>
675 <tr class="row12">
676 <td class="col0 rightalign"> 11 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
677 </tr>
678 </table></div>
679 <!-- EDIT1793 TABLE [14446-14969] --><ul>
680 <li class="level1"><div class="li"> The startangle can be negative, but not recommended.</div>
681 </li>
682 <li class="level1"><div class="li"> The sweepangle can be negative, but not recommended.</div>
683 </li>
684 <li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
685 <ul>
686 <li class="level2"><div class="li"> END NONE = 0</div>
687 </li>
688 <li class="level2"><div class="li"> END SQUARE = 1</div>
689 </li>
690 <li class="level2"><div class="li"> END ROUND = 2</div>
691 </li>
692 </ul>
693 </li>
694 <li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
695 <ul>
696 <li class="level2"><div class="li"> TYPE SOLID = 0</div>
697 </li>
698 <li class="level2"><div class="li"> TYPE DOTTED = 1</div>
699 </li>
700 <li class="level2"><div class="li"> TYPE DASHED = 2</div>
701 </li>
702 <li class="level2"><div class="li"> TYPE CENTER = 3</div>
703 </li>
704 <li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
705 </li>
706 </ul>
707 </li>
708 <li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
709 </li>
710 <li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
711 </li>
712 </ul>
715 Example:<br/>
717 </p>
718 <pre class="code">A 30600 75000 2000 0 45 3 0 0 3 75 50</pre>
721 An arc with the center at (30600, 75000) and a radius of 2000 mils, a starting angle of 0, sweeping 45 degrees, color index 3, line width of 0 mils (smallest size), no cap, center line type, dash length of 75 mils, dash spacing of 50 mils.
722 </p>
724 </div>
725 <!-- EDIT1792 SECTION "arc" [14294-15888] -->
726 <h3 class="sectionedit1794"><a name="text_and_attributes" id="text_and_attributes">text and attributes</a></h3>
727 <div class="level3">
730 Depending on context, text objects can play different roles. Outside any environment, they represent informative lines of text. When enclosed by curly braces, they are interpreted as attributes. See the <a href="geda-file_format_spec.html#attributes" class="wikilink1" title="geda-file_format_spec.html">attributes section</a>.
731 </p>
734 Valid in: Schematic and Symbol files<br/>
736 <strong><code>type x y color size visibility show_name_value angle alignment num_lines<br/>
738 string line 1<br/>
740 string line 2<br/>
742 string line 3<br/>
744 <br/>
746 string line N</code></strong>
747 </p>
748 <div class="table sectionedit1795"><table class="inline">
749 <tr class="row0">
750 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
751 </tr>
752 <tr class="row1">
753 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">T</td>
754 </tr>
755 <tr class="row2">
756 <td class="col0 rightalign"> 1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
757 </tr>
758 <tr class="row3">
759 <td class="col0 rightalign"> 2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
760 </tr>
761 <tr class="row4">
762 <td class="col0 rightalign"> 3 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
763 </tr>
764 <tr class="row5">
765 <td class="col0 rightalign"> 4 </td><td class="col1">size</td><td class="col2">int/points</td><td class="col3">Size of text</td>
766 </tr>
767 <tr class="row6">
768 <td class="col0 rightalign"> 5 </td><td class="col1">visibility</td><td class="col2">int</td><td class="col3">Visibility of text</td>
769 </tr>
770 <tr class="row7">
771 <td class="col0 rightalign"> 6 </td><td class="col1">show_name_value</td><td class="col2">int</td><td class="col3">Attribute visibility control</td>
772 </tr>
773 <tr class="row8">
774 <td class="col0 rightalign"> 7 </td><td class="col1">angle</td><td class="col2">int/degrees</td><td class="col3">Angle of the text</td>
775 </tr>
776 <tr class="row9">
777 <td class="col0 rightalign"> 8 </td><td class="col1">alignment</td><td class="col2">int</td><td class="col3">Alignment/origin of the text</td>
778 </tr>
779 <tr class="row10">
780 <td class="col0 rightalign"> 9 </td><td class="col1">num_lines</td><td class="col2">int</td><td class="col3">Number of lines of text (1 based)</td>
781 </tr>
782 <tr class="row11">
783 <td class="col0 rightalign"> 10 </td><td class="col1">string line 1 … N</td><td class="col2">string</td><td class="col3">The text strings, on a separate line</td>
784 </tr>
785 </table></div>
786 <!-- EDIT1795 TABLE [16371-16890] --><ul>
787 <li class="level1"><div class="li"> This object is a multi line object. The first line contains all the text parameters and the subsequent lines are the text strings.</div>
788 </li>
789 <li class="level1"><div class="li"> There must be exactly num lines of text following the T … string.</div>
790 </li>
791 <li class="level1"><div class="li"> The maximum length of any single text string is 1024, however there is no limit to the number of text string lines.</div>
792 </li>
793 <li class="level1"><div class="li"> The minimum size is 2 points (1/72 of an inch).</div>
794 </li>
795 <li class="level1"><div class="li"> There is no maximum size.</div>
796 </li>
797 <li class="level1"><div class="li"> The coordinate pair is the origin of the text item.</div>
798 </li>
799 <li class="level1"><div class="li"> The visibility field is an enumerated type:</div>
800 <ul>
801 <li class="level2"><div class="li"> INVISIBLE = 0</div>
802 </li>
803 <li class="level2"><div class="li"> VISIBLE = 1</div>
804 </li>
805 </ul>
806 </li>
807 <li class="level1"><div class="li"> The show_name_value is an enumerated type:</div>
808 <ul>
809 <li class="level2"><div class="li"> SHOW NAME VALUE = 0 (show both name and value of an attribute)</div>
810 </li>
811 <li class="level2"><div class="li"> SHOW VALUE = 1 (show only the value of an attribute)</div>
812 </li>
813 <li class="level2"><div class="li"> SHOW NAME = 2 (show only the name of an attribute)</div>
814 </li>
815 </ul>
816 </li>
817 <li class="level1"><div class="li"> The show_name_value field is only valid if the string is an attribute (string has to be in the form: name=value to be considered an attribute).</div>
818 </li>
819 <li class="level1"><div class="li"> The angle of the text can only take on one of the following values: 0, 90, 180, 270. A value of 270 will always generate upright text.</div>
820 </li>
821 <li class="level1"><div class="li"> The alignment/origin field controls the relative location of the origin.</div>
822 </li>
823 <li class="level1"><div class="li"> The alignment field can take a value from 0 to 8. <br/>
824 The following diagram shows what the values for the alignment field mean:</div>
825 </li>
826 </ul>
829 <a href="media/geda/fileformat_textgraphic.jpg" class="media" target="_blank" title="geda:fileformat_textgraphic.jpg"><img src="media/geda/fileformat_textgraphic.jpg" class="media" alt="" /></a>
830 </p>
831 <ul>
832 <li class="level1"><div class="li"> The num_lines field always starts at 1.<br/>
833 The num_lines field was added starting with file format version 1. Past versions (0 or earlier) only supported single line text objects.</div>
834 </li>
835 <li class="level1"><div class="li"> The text strings of the string line(s) can have overbars if the text is embedded in two overbar markers <strong>“\_”</strong>. A single backslash needs to be written as <strong>“\\”</strong>.</div>
836 </li>
837 </ul>
840 Example 1:<br/>
842 </p>
843 <pre class="code">T 16900 35800 3 10 1 0 0 0 1
844 Text string!</pre>
847 A text object with the origin at (16900, 35800), color index 3, 10 points in size, visible, attribute
848 flags not valid (not an attribute), origin at lower left, not rotated, string: Text string!
849 </p>
852 Example 2:<br/>
854 </p>
855 <pre class="code">T 16900 35800 3 10 1 0 0 0 5
856 Text string line 1
857 Text string line 2
858 Text string line 3
859 Text string line 4
860 Text string line 5</pre>
863 This is a similar text object as the above example, however here there are five lines of text.
864 </p>
867 Example 3:<br/>
869 </p>
870 <pre class="code">T 10000 20000 3 10 1 1 8 90 1
871 pinlabel=R/\_W\_</pre>
874 A text object with the origin at (10000, 20000), color index 3, 10 points in size, visible, only the value of the attribute is visible, text origin at upper right, the text is rotated by 90 degree, the string: “R/W” has an overbar over the “W”.
875 </p>
877 </div>
878 <!-- EDIT1794 SECTION "text and attributes" [15889-19393] -->
879 <h3 class="sectionedit1796"><a name="net" id="net">net</a></h3>
880 <div class="level3">
883 Valid in: Schematic files ONLY<br/>
885 <strong><code>type x1 y1 x2 y2 color</code></strong>
886 </p>
887 <div class="table sectionedit1797"><table class="inline">
888 <tr class="row0">
889 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
890 </tr>
891 <tr class="row1">
892 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">N</td>
893 </tr>
894 <tr class="row2">
895 <td class="col0 rightalign"> 1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
896 </tr>
897 <tr class="row3">
898 <td class="col0 rightalign"> 2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
899 </tr>
900 <tr class="row4">
901 <td class="col0 rightalign"> 3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
902 </tr>
903 <tr class="row5">
904 <td class="col0 rightalign"> 4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
905 </tr>
906 <tr class="row6">
907 <td class="col0 rightalign"> 5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
908 </tr>
909 </table></div>
910 <!-- EDIT1797 TABLE [19473-19715] --><ul>
911 <li class="level1"><div class="li"> Nets can only appear in schematic files.</div>
912 </li>
913 <li class="level1"><div class="li"> You cannot have a zero length net (the tools will throw them away).</div>
914 </li>
915 </ul>
918 Example:<br/>
920 </p>
921 <pre class="code">N 12700 29400 32900 29400 4</pre>
924 A net segment from (12700, 29400) to (32900, 29400) with color index 4.
925 </p>
927 </div>
928 <!-- EDIT1796 SECTION "net" [19394-19960] -->
929 <h3 class="sectionedit1798"><a name="bus" id="bus">bus</a></h3>
930 <div class="level3">
933 Valid in: Schematic files ONLY<br/>
935 <strong><code>type x1 y1 x2 y2 color ripperdir</code></strong>
936 </p>
937 <div class="table sectionedit1799"><table class="inline">
938 <tr class="row0">
939 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
940 </tr>
941 <tr class="row1">
942 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">U</td>
943 </tr>
944 <tr class="row2">
945 <td class="col0 rightalign"> 1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
946 </tr>
947 <tr class="row3">
948 <td class="col0 rightalign"> 2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
949 </tr>
950 <tr class="row4">
951 <td class="col0 rightalign"> 3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
952 </tr>
953 <tr class="row5">
954 <td class="col0 rightalign"> 4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
955 </tr>
956 <tr class="row6">
957 <td class="col0 rightalign"> 5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
958 </tr>
959 <tr class="row7">
960 <td class="col0 rightalign"> 6 </td><td class="col1">ripperdir</td><td class="col2">int</td><td class="col3">Direction of bus rippers</td>
961 </tr>
962 </table></div>
963 <!-- EDIT1799 TABLE [20050-20339] --><ul>
964 <li class="level1"><div class="li"> The ripperdir field for an brand new bus is 0.</div>
965 </li>
966 <li class="level1"><div class="li"> The ripperdir field takes on a value of 1 or -1 when a net is connected to the bus for the first time. This value indicates the direction of the ripper symbol. The ripper direction is set to the same value for the entire life of the bus object.</div>
967 </li>
968 <li class="level1"><div class="li"> Buses can only appear in schematic files.</div>
969 </li>
970 <li class="level1"><div class="li"> You cannot have a zero length bus (the tools will throw them away).</div>
971 </li>
972 </ul>
975 Example:<br/>
977 </p>
978 <pre class="code">U 27300 37400 27300 35300 3 0</pre>
981 A bus segment from (27300, 37400) to (27300, 35300) with color index 3 and no nets have been connected to this bus segment.
982 </p>
984 </div>
985 <!-- EDIT1798 SECTION "bus" [19961-20939] -->
986 <h3 class="sectionedit1800"><a name="pin" id="pin">pin</a></h3>
987 <div class="level3">
990 Valid in: Symbol files ONLY<br/>
992 <strong><code>type x1 y1 x2 y2 color pintype whichend</code></strong>
993 </p>
994 <div class="table sectionedit1801"><table class="inline">
995 <tr class="row0">
996 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
997 </tr>
998 <tr class="row1">
999 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">P</td>
1000 </tr>
1001 <tr class="row2">
1002 <td class="col0 rightalign"> 1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
1003 </tr>
1004 <tr class="row3">
1005 <td class="col0 rightalign"> 2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
1006 </tr>
1007 <tr class="row4">
1008 <td class="col0 rightalign"> 3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
1009 </tr>
1010 <tr class="row5">
1011 <td class="col0 rightalign"> 4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
1012 </tr>
1013 <tr class="row6">
1014 <td class="col0 rightalign"> 5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
1015 </tr>
1016 <tr class="row7">
1017 <td class="col0 rightalign"> 6 </td><td class="col1">pintype</td><td class="col2">int</td><td class="col3">Type of pin</td>
1018 </tr>
1019 <tr class="row8">
1020 <td class="col0 rightalign"> 7 </td><td class="col1">whichend</td><td class="col2">int</td><td class="col3">Specifies the active end</td>
1021 </tr>
1022 </table></div>
1023 <!-- EDIT1801 TABLE [21033-21353] --><ul>
1024 <li class="level1"><div class="li"> The pintype is an enumerated type:</div>
1025 <ul>
1026 <li class="level2"><div class="li"> NORMAL <acronym title="Personal Identification Number">PIN</acronym> = 0</div>
1027 </li>
1028 <li class="level2"><div class="li"> BUS <acronym title="Personal Identification Number">PIN</acronym> = 1 unused</div>
1029 </li>
1030 </ul>
1031 </li>
1032 <li class="level1"><div class="li"> The whichend specifies which end point of the pin is the active connection port. Only this end point can have other pins or nets connected to it.</div>
1033 </li>
1034 <li class="level1"><div class="li"> To make the first end point active, whichend should be 0, else to specify the other end, whichend should be 1.</div>
1035 </li>
1036 <li class="level1"><div class="li"> Pins can only appear in symbol files.</div>
1037 </li>
1038 <li class="level1"><div class="li"> Zero length pins are allowed</div>
1039 </li>
1040 </ul>
1043 Example:<br/>
1045 </p>
1046 <pre class="code">P 0 200 200 200 1 0 0</pre>
1049 A pin from (0, 200) to (200, 200) with color index 1, a regular pin, and the first point being the active connection end.
1050 </p>
1052 </div>
1053 <!-- EDIT1800 SECTION "pin" [20940-21950] -->
1054 <h3 class="sectionedit1802"><a name="component" id="component">component</a></h3>
1055 <div class="level3">
1058 Valid in: Schematic files ONLY<br/>
1060 <strong><code>type x y selectable angle mirror basename</code></strong>
1061 </p>
1062 <div class="table sectionedit1803"><table class="inline">
1063 <tr class="row0">
1064 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
1065 </tr>
1066 <tr class="row1">
1067 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">C</td>
1068 </tr>
1069 <tr class="row2">
1070 <td class="col0 rightalign"> 1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Origin X coordinate</td>
1071 </tr>
1072 <tr class="row3">
1073 <td class="col0 rightalign"> 2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Origin Y coordinate</td>
1074 </tr>
1075 <tr class="row4">
1076 <td class="col0 rightalign"> 3 </td><td class="col1">selectable</td><td class="col2">int</td><td class="col3">Selectable flag</td>
1077 </tr>
1078 <tr class="row5">
1079 <td class="col0 rightalign"> 4 </td><td class="col1">angle</td><td class="col2">int/degrees</td><td class="col3">Angle of the component</td>
1080 </tr>
1081 <tr class="row6">
1082 <td class="col0 rightalign"> 5 </td><td class="col1">mirror</td><td class="col2">int</td><td class="col3">Mirror around Y axis</td>
1083 </tr>
1084 <tr class="row7">
1085 <td class="col0 rightalign"> 6 </td><td class="col1">basename</td><td class="col2">string</td><td class="col3">The filename of the component</td>
1086 </tr>
1087 </table></div>
1088 <!-- EDIT1803 TABLE [22055-22369] --><ul>
1089 <li class="level1"><div class="li"> The selectable field is either 1 for selectable or 0 if not selectable.</div>
1090 </li>
1091 <li class="level1"><div class="li"> The angle field can only take on the following values: 0, 90, 180, 270.</div>
1092 </li>
1093 <li class="level1"><div class="li"> The angle field can only be positive.</div>
1094 </li>
1095 <li class="level1"><div class="li"> The mirror flag is 0 if the component is not mirrored (around the Y axis).</div>
1096 </li>
1097 <li class="level1"><div class="li"> The mirror flag is 1 if the component is mirrored (around the Y axis).</div>
1098 </li>
1099 <li class="level1"><div class="li"> The just basename is the filename of the component. This filename is not the full path.</div>
1100 </li>
1101 </ul>
1104 Example:<br/>
1106 </p>
1107 <pre class="code">C 18600 19900 1 0 0 7400-1.sym</pre>
1110 A component who&#039;s origin is at (18600,19900), is selectable, not rotated, not mirrored, and the basename of the component is 7400-1.sym.
1111 </p>
1113 </div>
1114 <!-- EDIT1802 SECTION "component" [21951-23006] -->
1115 <h3 class="sectionedit1804"><a name="path" id="path">path</a></h3>
1116 <div class="level3">
1119 Valid in: Schematic and Symbol files<br/>
1121 Valid since: Fileformat version 2 (release 1.5.1)<br/>
1123 <strong><code>type color width capstyle dashstyle dashlength dashspace filltype fillwidth angle1 pitch1 angle2 pitch2 numlines<br/>
1125 path data line 1<br/>
1127 path data line 2<br/>
1129 path data line 3<br/>
1131 <br/>
1133 path data line N</code></strong>
1134 </p>
1135 <div class="table sectionedit1805"><table class="inline">
1136 <tr class="row0">
1137 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
1138 </tr>
1139 <tr class="row1">
1140 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">H</td>
1141 </tr>
1142 <tr class="row2">
1143 <td class="col0 rightalign"> 1 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
1144 </tr>
1145 <tr class="row3">
1146 <td class="col0 rightalign"> 2 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of line</td>
1147 </tr>
1148 <tr class="row4">
1149 <td class="col0 rightalign"> 3 </td><td class="col1">capstyle</td><td class="col2">int</td><td class="col3">Line cap style</td>
1150 </tr>
1151 <tr class="row5">
1152 <td class="col0 rightalign"> 4 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
1153 </tr>
1154 <tr class="row6">
1155 <td class="col0 rightalign"> 5 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
1156 </tr>
1157 <tr class="row7">
1158 <td class="col0 rightalign"> 6 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
1159 </tr>
1160 <tr class="row8">
1161 <td class="col0 rightalign"> 7 </td><td class="col1">filltype</td><td class="col2">int</td><td class="col3">Type of fill</td>
1162 </tr>
1163 <tr class="row9">
1164 <td class="col0 rightalign"> 8 </td><td class="col1">fillwidth</td><td class="col2">int/mils</td><td class="col3">Width of the fill lines</td>
1165 </tr>
1166 <tr class="row10">
1167 <td class="col0 rightalign"> 9 </td><td class="col1">angle1</td><td class="col2">int/degrees</td><td class="col3">First angle of fill</td>
1168 </tr>
1169 <tr class="row11">
1170 <td class="col0 rightalign"> 10 </td><td class="col1">pitch1</td><td class="col2">int/mils</td><td class="col3">First pitch/spacing of fill</td>
1171 </tr>
1172 <tr class="row12">
1173 <td class="col0 rightalign"> 11 </td><td class="col1">angle2</td><td class="col2">int/degrees</td><td class="col3">Second angle of fill</td>
1174 </tr>
1175 <tr class="row13">
1176 <td class="col0 rightalign"> 12 </td><td class="col1">pitch2</td><td class="col2">int/mils</td><td class="col3">Second pitch/spacing of fill</td>
1177 </tr>
1178 <tr class="row14">
1179 <td class="col0 rightalign"> 13 </td><td class="col1">num_lines</td><td class="col2">int</td><td class="col3">Number of lines of path data (1 based)</td>
1180 </tr>
1181 <tr class="row15">
1182 <td class="col0 rightalign"> 14 </td><td class="col1">path data line 1 … N</td><td class="col2">path data</td><td class="col3">The path data, on separate lines</td>
1183 </tr>
1184 </table></div>
1185 <!-- EDIT1805 TABLE [23317-24028] --><ul>
1186 <li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
1187 <ul>
1188 <li class="level2"><div class="li"> END NONE = 0</div>
1189 </li>
1190 <li class="level2"><div class="li"> END SQUARE = 1</div>
1191 </li>
1192 <li class="level2"><div class="li"> END ROUND = 2</div>
1193 </li>
1194 </ul>
1195 </li>
1196 </ul>
1197 <ul>
1198 <li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
1199 <ul>
1200 <li class="level2"><div class="li"> TYPE SOLID = 0</div>
1201 </li>
1202 <li class="level2"><div class="li"> TYPE DOTTED = 1</div>
1203 </li>
1204 <li class="level2"><div class="li"> TYPE DASHED = 2</div>
1205 </li>
1206 <li class="level2"><div class="li"> TYPE CENTER = 3</div>
1207 </li>
1208 <li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
1209 </li>
1210 </ul>
1211 </li>
1212 <li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
1213 </li>
1214 <li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
1215 </li>
1216 </ul>
1217 <ul>
1218 <li class="level1"><div class="li"> The filltype parameter is an enumerated type:</div>
1219 <ul>
1220 <li class="level2"><div class="li"> FILLING HOLLOW = 0</div>
1221 </li>
1222 <li class="level2"><div class="li"> FILLING FILL = 1</div>
1223 </li>
1224 <li class="level2"><div class="li"> FILLING MESH = 2</div>
1225 </li>
1226 <li class="level2"><div class="li"> FILLING HATCH = 3</div>
1227 </li>
1228 <li class="level2"><div class="li"> FILLING VOID = 4 unused</div>
1229 </li>
1230 </ul>
1231 </li>
1232 <li class="level1"><div class="li"> If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.</div>
1233 </li>
1234 <li class="level1"><div class="li"> The fill type FILLING FILL is a solid color fill.</div>
1235 </li>
1236 <li class="level1"><div class="li"> The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.</div>
1237 </li>
1238 <li class="level1"><div class="li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.</div>
1239 </li>
1240 </ul>
1241 <ul>
1242 <li class="level1"><div class="li"> The format of path data is deliberately similar to that of <a href="http://www.w3.org/TR/SVG/paths.html" class="urlextern" title="http://www.w3.org/TR/SVG/paths.html" rel="nofollow">paths in the W3C SVG standard</a>.</div>
1243 </li>
1244 <li class="level1"><div class="li"> The subset of the <acronym title="Scalable Vector Graphics">SVG</acronym> path syntax emitted by gEDA is documented below in section <a href="geda-file_format_spec.html#path_data" class="wikilink1" title="geda-file_format_spec.html">Path Data</a>.</div>
1245 </li>
1246 <li class="level1"><div class="li"> As an implementation detail; libgeda takes code from librsvg, an <acronym title="Scalable Vector Graphics">SVG</acronym> parsing library. As a result, the majority of <acronym title="Scalable Vector Graphics">SVG</acronym> path syntax is read correctly, however this is always normalised to absolute move, line, Bézier curve and close-path commands internally (and is saved as such).</div>
1247 </li>
1248 <li class="level1"><div class="li"> Coordinates along the path are specified in the standard gschem coordinate space.</div>
1249 </li>
1250 </ul>
1253 Example:
1254 </p>
1255 <pre class="code">H 3 10 0 0 -1 -1 0 -1 -1 -1 -1 -1 5
1256 M 410,240
1257 L 501,200
1258 L 455,295
1259 L 435,265
1260 z</pre>
1263 A path starting at (410,240) with lines drawn from there, and joining points (501,200), (455,295), (435,265), closing back to its origin. It has color index 3, is 10 mils thick, no cap, solid style. There are 5 lines of path data.
1264 </p>
1266 </div>
1267 <!-- EDIT1804 SECTION "path" [23007-26023] -->
1268 <h3 class="sectionedit1806"><a name="font" id="font">font</a></h3>
1269 <div class="level3">
1272 Valid in: Special font files ONLY<br/>
1274 <strong><code>type character width flag</code></strong>
1275 </p>
1276 <div class="table sectionedit1807"><table class="inline">
1277 <tr class="row0">
1278 <th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
1279 </tr>
1280 <tr class="row1">
1281 <td class="col0 rightalign"> # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">F</td>
1282 </tr>
1283 <tr class="row2">
1284 <td class="col0 rightalign"> 1 </td><td class="col1">character</td><td class="col2">char</td><td class="col3">The character being defined</td>
1285 </tr>
1286 <tr class="row3">
1287 <td class="col0 rightalign"> 2 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of the character (mils)</td>
1288 </tr>
1289 <tr class="row4">
1290 <td class="col0 rightalign"> 3 </td><td class="col1">flag</td><td class="col2">int</td><td class="col3">Special space flag</td>
1291 </tr>
1292 </table></div>
1293 <!-- EDIT1807 TABLE [26110-26304] --><ul>
1294 <li class="level1"><div class="li"> This is a special tag and should ONLY show up in font definition files.</div>
1295 </li>
1296 <li class="level1"><div class="li"> If the font character being defined is the space character (32) then flag should be 1, otherwise 0.</div>
1297 </li>
1298 </ul>
1301 Example:<br/>
1303 </p>
1304 <pre class="code">F 11 1</pre>
1307 The above font definition is for the space character.
1308 </p>
1310 </div>
1311 <!-- EDIT1806 SECTION "font" [26024-26574] -->
1312 <h2 class="sectionedit1808"><a name="colors" id="colors">Colors</a></h2>
1313 <div class="level2">
1316 In the gEDA/gaf schematic and symbol file format colors are specified via an integer index. The relationship between integer and color is based on object type. Each object type typically has one or more colors. Here is a table of color index to object type:
1317 </p>
1318 <div class="table sectionedit1809"><table class="inline">
1319 <tr class="row0">
1320 <th class="col0">Index</th><th class="col1">Object type</th>
1321 </tr>
1322 <tr class="row1">
1323 <td class="col0">0</td><td class="col1">BACKGROUND_COLOR</td>
1324 </tr>
1325 <tr class="row2">
1326 <td class="col0">1</td><td class="col1"><acronym title="Personal Identification Number">PIN</acronym>_COLOR</td>
1327 </tr>
1328 <tr class="row3">
1329 <td class="col0">2</td><td class="col1">NET_ENDPOINT_COLOR</td>
1330 </tr>
1331 <tr class="row4">
1332 <td class="col0">3</td><td class="col1">GRAPHIC_COLOR</td>
1333 </tr>
1334 <tr class="row5">
1335 <td class="col0">4</td><td class="col1">NET_COLOR</td>
1336 </tr>
1337 <tr class="row6">
1338 <td class="col0">5</td><td class="col1">ATTRIBUTE_COLOR</td>
1339 </tr>
1340 <tr class="row7">
1341 <td class="col0">6</td><td class="col1">LOGIC_BUBBLE_COLOR</td>
1342 </tr>
1343 <tr class="row8">
1344 <td class="col0">7</td><td class="col1">DOTS_GRID_COLOR</td>
1345 </tr>
1346 <tr class="row9">
1347 <td class="col0">8</td><td class="col1">DETACHED_ATTRIBUTE_COLOR</td>
1348 </tr>
1349 <tr class="row10">
1350 <td class="col0">9</td><td class="col1">TEXT_COLOR</td>
1351 </tr>
1352 <tr class="row11">
1353 <td class="col0">10</td><td class="col1">BUS_COLOR</td>
1354 </tr>
1355 <tr class="row12">
1356 <td class="col0">11</td><td class="col1">SELECT_COLOR</td>
1357 </tr>
1358 <tr class="row13">
1359 <td class="col0">12</td><td class="col1">BOUNDINGBOX_COLOR</td>
1360 </tr>
1361 <tr class="row14">
1362 <td class="col0">13</td><td class="col1">ZOOM_BOX_COLOR</td>
1363 </tr>
1364 <tr class="row15">
1365 <td class="col0">14</td><td class="col1">STROKE_COLOR</td>
1366 </tr>
1367 <tr class="row16">
1368 <td class="col0">15</td><td class="col1">LOCK_COLOR</td>
1369 </tr>
1370 <tr class="row17">
1371 <td class="col0">16</td><td class="col1">OUTPUT_BACKGROUND_COLOR</td>
1372 </tr>
1373 <tr class="row18">
1374 <td class="col0">17</td><td class="col1">FREESTYLE1_COLOR</td>
1375 </tr>
1376 <tr class="row19">
1377 <td class="col0">18</td><td class="col1">FREESTYLE2_COLOR</td>
1378 </tr>
1379 <tr class="row20">
1380 <td class="col0">19</td><td class="col1">FREESTYLE3_COLOR</td>
1381 </tr>
1382 <tr class="row21">
1383 <td class="col0">20</td><td class="col1">FREESTYLE4_COLOR</td>
1384 </tr>
1385 <tr class="row22">
1386 <td class="col0">21</td><td class="col1">JUNCTION_COLOR</td>
1387 </tr>
1388 <tr class="row23">
1389 <td class="col0">22</td><td class="col1">MESH_GRID_MAJOR_COLOR</td>
1390 </tr>
1391 <tr class="row24">
1392 <td class="col0">23</td><td class="col1">MESH_GRID_MINOR_COLOR</td>
1393 </tr>
1394 </table></div>
1395 <!-- EDIT1809 TABLE [26853-27370] -->
1397 The actual color associated with the color index is defined on a per tool bases. Objects are typically assigned their corresponding color index, but it is permissible (sometimes) to assign other color index values to different object types.
1398 </p>
1400 </div>
1401 <!-- EDIT1808 SECTION "Colors" [26575-27613] -->
1402 <h2 class="sectionedit1810"><a name="attributes" id="attributes">Attributes</a></h2>
1403 <div class="level2">
1406 Attributes are enclosed in braces {} and can only be text. Attributes are text items which take on the form name=value. If it doesn&#039;t have name=value, it&#039;s not an attribute. Attributes are attached to the previous object. Here&#039;s an example:
1407 </p>
1408 <pre class="code">P 988 500 1300 500 1
1410 T 1000 570 5 8 1 1 0
1411 pinseq=3
1412 T 1000 550 5 8 1 1 0
1413 pinnumber=3
1414 }</pre>
1417 The object is a pin which has an attribute pinnumber=3 and pinseq=3 (name=value). You can have multiple text objects (both the T … and text string are required) in between the braces {}. As of 20021103, you can only attached text items as attributes. Attaching other object types as attributes is unsupported.<br/>
1419 You can also have “toplevel” attributes. These attributes are not attached to any object, but instead are just text objects that take on the form name=value.<br/>
1421 These attributes are useful when you need to convey some info about a schematic page or symbol and need the netlister to have access to this info.
1422 </p>
1424 </div>
1425 <!-- EDIT1810 SECTION "Attributes" [27614-28601] -->
1426 <h2 class="sectionedit1811"><a name="embedded_components" id="embedded_components">Embedded Components</a></h2>
1427 <div class="level2">
1430 Embedded components are components which have all of their definition stored within the schematic file. When a users place a component onto a schematic page, they have the option of making the component embedded. Other than storing all the symbol information inside of the schematic, an embedded component is just any other component. Embedded components are defined as:
1431 </p>
1432 <pre class="code">C 18600 21500 1 0 0 EMBEDDED555-1.sym
1435 ... Embedded primitive objects
1437 ]</pre>
1440 In the example above, <strong>555-1.sym</strong> is the component. The EMBEDDED tag and the [ ] are the distinguishing characteristics of embedded components. <strong>componentname.sym</strong> must exist in one of the specified component-libraries if you want to unembed the component.
1441 </p>
1443 </div>
1444 <!-- EDIT1811 SECTION "Embedded Components" [28602-29366] -->
1445 <h2 class="sectionedit1812"><a name="path_data" id="path_data">Path data</a></h2>
1446 <div class="level2">
1449 The gEDA/gaf path data format has been deliberately specified to match a subset of <a href="http://www.w3.org/TR/SVG/paths.html" class="urlextern" title="http://www.w3.org/TR/SVG/paths.html" rel="nofollow">that in the W3C SVG standard.</a>.
1450 </p>
1451 <ul>
1452 <li class="level1"><div class="li"> As an implementation detail; libgeda takes code from librsvg, an <acronym title="Scalable Vector Graphics">SVG</acronym> parsing library. As a result, the majority of <acronym title="Scalable Vector Graphics">SVG</acronym> path syntax is read correctly, however this is always normalised to absolute move, line, Bézier curve and close-path commands internally (and is saved as such).</div>
1453 </li>
1454 <li class="level1"><div class="li"> Coordinates along the path are specified in the standard gschem coordinate space.</div>
1455 </li>
1456 <li class="level1"><div class="li"> Those path commands which gEDA emits, and will guarantee to parse, are listed in the table below:<br/>
1457 (Text taken from the above <acronym title="Scalable Vector Graphics">SVG</acronym> specification).</div>
1458 </li>
1459 <li class="level1"><div class="li"> In the table below, the following notation is used:</div>
1460 <ul>
1461 <li class="level2"><div class="li"> (): grouping of parameters</div>
1462 </li>
1463 <li class="level2"><div class="li"> +: 1 or more of the given parameter(s) is required</div>
1464 </li>
1465 </ul>
1466 </li>
1467 </ul>
1468 <div class="table sectionedit1813"><table class="inline">
1469 <tr class="row0">
1470 <th class="col0">Command</th><th class="col1">Name</th><th class="col2">Parameters</th><th class="col3">Description</th>
1471 </tr>
1472 <tr class="row1">
1473 <td class="col0">M (absolute)</td><td class="col1">moveto</td><td class="col2">(x,y)+</td><td class="col3">Start a new sub-path at the given (x,y) coordinate. M (uppercase) indicates that absolute coordinates will follow; m (lowercase) indicates that relative coordinates will follow. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands.</td>
1474 </tr>
1475 <tr class="row2">
1476 <td class="col0">L (absolute)</td><td class="col1">lineto</td><td class="col2">(x,y)+</td><td class="col3">Draw a line from the current point to the given (x,y) coordinate which becomes the new current point. L (uppercase) indicates that absolute coordinates will follow; l (lowercase) indicates that relative coordinates will follow. A number of coordinates pairs may be specified to draw a polyline. At the end of the command, the new current point is set to the final set of coordinates provided.</td>
1477 </tr>
1478 <tr class="row3">
1479 <td class="col0">C (absolute)</td><td class="col1">curveto</td><td class="col2">(x1,y1 x2,y2 x,y)+</td><td class="col3">Draws a cubic Bézier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve. C (uppercase) indicates that absolute coordinates will follow; c (lowercase) indicates that relative coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier.</td>
1480 </tr>
1481 <tr class="row4">
1482 <td class="col0">Z or z</td><td class="col1">closepath</td><td class="col2">(none)</td><td class="col3">Close the current subpath by drawing a straight line from the current point to current subpath&#039;s initial point.</td>
1483 </tr>
1484 </table></div>
1485 <!-- EDIT1813 TABLE [30214-31793] --><ul>
1486 <li class="level1"><div class="li"> gEDA&#039;s output currently emits only the absolute coordinate versions of the above commands.</div>
1487 </li>
1488 <li class="level1"><div class="li"> gEDA&#039;s output currently emits the commands, M, L, C before every set of coordinates, even where they could be omitted according to the <acronym title="Scalable Vector Graphics">SVG</acronym> specification.</div>
1489 </li>
1490 <li class="level1"><div class="li"> gEDA&#039;s output places commas between x,y coordinates. These may be replaced with whitespace according to the <acronym title="Scalable Vector Graphics">SVG</acronym> specification.</div>
1491 </li>
1492 <li class="level1"><div class="li"> gEDA&#039;s does not currently support more than one sub-path.</div>
1493 </li>
1494 <li class="level1"><div class="li"> gEDA currently emits one path data line per command + coordinate set.</div>
1495 </li>
1496 </ul>
1499 As example, lets draw the outline of an AND gate. The path data is:
1500 </p>
1501 <pre class="code">M 100,100 L 500,100 C 700,100 800,275 800,400
1502 C 800,525 700,700 500,700 L 100,700 z</pre>
1505 And a complete schematic:
1506 </p>
1507 <pre class="code">v 20080706 1
1508 H 3 0 0 0 -1 -1 0 2 20 100 -1 -1 6
1509 M 100,100
1510 L 500,100
1511 C 700,100 800,275 800,400
1512 C 800,525 700,700 500,700
1513 L 100,700
1514 z</pre>
1517 The resulting path (with control points drawn on to illustrate their positions) is shown here:
1518 </p>
1521 <a href="media/geda/path_example_and_gate-smaller.png" class="media" target="_blank" title="geda:path_example_and_gate-smaller.png"><img src="media/geda/path_example_and_gate-smaller.png" class="media" title="" alt="" /></a>
1522 </p>
1524 </div>
1525 <!-- EDIT1812 SECTION "Path data" [29367-32796] -->
1526 <h2 class="sectionedit1814"><a name="document_revision_history" id="document_revision_history">Document Revision History</a></h2>
1527 <div class="level2">
1528 <div class="table sectionedit1815"><table class="inline">
1529 <tr class="row0">
1530 <td class="col0">November 30th, 2002</td><td class="col1">Created fleformats.tex from fleformats.html.</td>
1531 </tr>
1532 <tr class="row1">
1533 <td class="col0">December 1st, 2002</td><td class="col1">Continued work on this document.</td>
1534 </tr>
1535 <tr class="row2">
1536 <td class="col0">October 4th, 2003</td><td class="col1">Added new file format version flag info.</td>
1537 </tr>
1538 <tr class="row3">
1539 <td class="col0">October 19th, 2003</td><td class="col1">Added num lines text field.</td>
1540 </tr>
1541 <tr class="row4">
1542 <td class="col0">November 2nd, 2008</td><td class="col1">Added path object, bumping file format version to 2</td>
1543 </tr>
1544 <tr class="row5">
1545 <td class="col0">May 26th, 2011</td><td class="col1">Added a column for the position of parameters in the tables</td>
1546 </tr>
1547 </table></div>
1548 <!-- EDIT1815 TABLE [32835-33215] -->
1549 </div>
1550 <!-- EDIT1814 SECTION "Document Revision History" [32797-] --></body>
1551 </html>